Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rustでディープラーニング
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kazumasa Yamamoto
February 25, 2021
460
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rustでディープラーニング
Kazumasa Yamamoto
February 25, 2021
More Decks by Kazumasa Yamamoto
See All by Kazumasa Yamamoto
ユニークビジョンの Rust 活用事例
fill9120
2
1.8k
Rust & AWS X-Ray による分散トレーシングの実現
fill9120
0
2.9k
Rust製プロダクトを 3年以上運用して得たノウハウ
fill9120
0
1.1k
Messaging APIを駆使した ChatGPT ボットのUX改善
fill9120
0
390
Rust を開発言語として採用してからの取り組み
fill9120
1
1.9k
ストラクチャードコミュニケーション
fill9120
0
140
Cloudflare PagesにVue.jsアプリをデプロイしてみた
fill9120
0
1.1k
Rustで定数式を扱う
fill9120
0
460
LINE BotとLIFFを使って謎解きアプリを作った話
fill9120
0
760
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
WENDY [Excerpt]
tessaabrams
11
38k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
The browser strikes back
jonoalderson
0
1.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
350
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
The agentic SEO stack - context over prompts
schlessera
0
820
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
620
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Skip the Path - Find Your Career Trail
mkilby
1
150
Transcript
Rustでディープラーニング ユニークビジョン株式会社 山本 一将
自己紹介 2 ⚫ 名前:山本 一将(@kyamamoto9120) ⚫ 所属:ユニークビジョン株式会社 ⚫ 言語:C++, Rust,
Python, Ruby ⚫ 趣味:将棋、キャンプ、DIY、野球観戦 ⚫ 実績:2015年 世界コンピュータ将棋選手権9位
はじめに 3 ① このスライドはconnpassにて公開します ② 実際の利用方法はQiitaに書きました
ディープラーニングの背景 4 ⚫ 学習・推論ともにPythonでの例がほとんど • ライブラリ・プラットフォームが充実している • 情報も多く、初学者にも優しい ⚫ 一方、C++は使われるケースがある
• TensorFlow Servingのような推論環境 • 囲碁、将棋のようなゲームAI
Rustにおけるディープラーニング 5 ⚫ パフォーマンスが要求される場面で使いたい • C++は辛すぎる ⚫ 有名フレームワークのRustバインディングはある! • 情報は皆無
• ドキュメントも乏しい
有名フレームワークのRustバインディング 6 TensorFlow PyTorch tensorflow crate tch 公式 提供元 非公式
2.9k Star 942 ◦ GPUサポート ◦ ◦ モデル構築 ◦ ◦ 学習 ◦ ◦ Python製モデルで推論 ?
それぞれ使ってみた感想 7 ⚫ 環境構築 • CPUでちょっと使ってみるだけならtchが簡単 • 本格的に使う場合は差はない ⚫ モデル構築
• tchはPythonと比較的近いインタフェースで構築可能 • tensorflowは苦行 • 学習をRustでする場合でもモデル構築はPythonで行うべき
それぞれ使ってみた感想 8 ⚫ 学習 • tchはデータセットを扱う便利関数がある • tchには転移学習のサンプルもあって実用的 • tensorflowはサンプルだけでは何とも言えない
⚫ 事前学習済みモデルでの推論 • tensorflowはPythonで学習した重みを利用可能 • tchはPythonで学習した重みが使えるかは不明 • サンプルではOCaml版のモデルを使っている
まとめ 9 ⚫ Rustでもディープラーニングは可能 ⚫ ディープラーニング初学者が試しに使うならtch! ⚫ 推論のみ高速化するならtensorflow! ⚫ C++の代替として普及して欲しい
ありがとうございました