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
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
400
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
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Optimizing for Happiness
mojombo
378
71k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.9k
Being A Developer After 40
akosma
91
590k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
420
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
HDC tutorial
michielstock
2
750
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
350
Building the Perfect Custom Keyboard
takai
2
820
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
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++の代替として普及して欲しい
ありがとうございました