Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TensorFlow on Android
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Arata Furukawa
October 09, 2016
Technology
2.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TensorFlow on Android
DevFest Tokyo 2016 にて発表したスライドです。
http://gdg-tokyo.connpass.com/event/38927/
Arata Furukawa
October 09, 2016
Transcript
41 slides
TensorFlow on Android 日本Androidの会・東海大学1年 古川新
古川 新 Arata Furukawa http://ornew.net/ 東海大学 理学部1年生 MaruLabo管理者 日本Androidの会 運営委員
日本Androidの会 学生部 © Arata Furukawa
DeepLearning
AlexNet © TensorFlow Tutorial “Image Recognition” https://www.tensorflow.org/versions/r0.11/tutorials/image_recognition/index.html
Google DeepDream © Alexander Mordvintsev https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb
Facebook DeepFace © Yaniv TaigmanMing YangMarc'Aurelio RanzatoLior Wolf /「DeepFace: Closing
the Gap to Human-Level Performance in Face Verification」
Androidアプリで 使いたい! The Android robot is reproduced or modified from
work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
学習と利用の非対称性
学習の演算コスト 膨大な回数の反復学習が必要 専用のハードウェアなど かなりの計算資源を使っても 莫大な時間がかかる (上写真) 「AlphaGo の試合に用いられた Googleの ディープラーニング専用サーバ」
Google Cloud Platform Japan Blogより引用 (右写真) 「Facebook’s open-sourcing of AI hardware is the start of the deep-learning revolution」より引用
人工知能は、 筋肉と同じ
筋肉を鍛えるには、たくさんの時間とお金が必要です 何回も何回もトレーニングして、 少しずつ筋肉は強くなります
一方で、筋肉を使って動くのは簡単 時間もお金もかかりません
利用の演算コスト 反復実行も、誤差評価も、逆伝搬もしない →桁違いにコストは少ない
現実的な演算コスト 学習 > 利用
学習済みモデルを利用するだけなら モバイルで動きます
TensorFlow
データフローグラフ型 汎用数値演算ライブラリ TensorFlow 抽象的でスケーラビリティかつポータビリティな、 非同期並列に実行可能な数値演算の仕組みを 実現するライブラリ。
TensorFlow Graph あらゆる演算は、 データフローを向きとした 有向グラフで表現されます。 y = 2x x mul
y 2
Deep Neural Networks ディープニューラルネットワーク(DNN)は Tensor(スカラ・ベクトル等)に対する 巨大な演算として表現されます。 DNNはTensorFlowグラフとして 表現することができます。 つまり、TensorFlowでDeepLearningができます。
None
TensorFlowを使った リバーシAI Androidアプリ ABC 2016 Autumnで公開予定!
Android Firebase プレイデータを自動送信 AIが定期的に自動更新される TensorFlow
Firebase Realtime Database Run TensorFlow Data Server C++ Java Protocol
Buffers JNI Reversi お寿司リバーシの構成:Androidアプリ側 HTTPS Android App
Javaとの連携 TensorFlowはJavaをサポートしていないため Android Native Development Kit (NDK)か Java Native Interface
(JNI)を使うことになります。 お寿司では、JNIを使っています。
TensorFlowのビルド・実行 Android向けにTensorFlowバイナリをBazelで クロスコンパイルします。 ドキュメントは一切ないので、 Issueで情報を集めて試行錯誤するか、中の人に聞くかです。 作った動的ライブラリをJavaでロードし、 ネイティブコードを実行します。
Serialize TensorFlow Graphは Protocol Buffers形式で シリアライズできます。 y = 2x x
mul y 2 graph.pb
関数としてのTensorFlow Graph TensoFlow Graphは、演算の集合を、 データフローを向きとするグラフで表現したものですので、入 力と出力があります。 よって、グラフそのものを関数と考えても差し支え ありません。
画像データ ??? 文字データ 5041 Function? F(x) -> y TensorFlow Graph
Black Box 関数として考えたならば、入力と出力の形状さえ 一致していれば、このグラフの処理がなんであろう と関係ありません。 グラフを差し替えたとしても、形状が一致すれば ユーザコードをアップデートする必要はありませ ん。
True Portability! グラフファイルを差し替えるだけで処理をすり替え られるため、お寿司AIの更新はグラフファイルを サーバからダウンロードするだけであり、可搬性が 非常に高いです。
新しいアプリ開発の形? ニューラルネットワークは処理能力に乏しい モバイルプラットフォームでも利用できます。 Deep Learningは、モデルさえあれば一般的な アプリに組み込むことが可能な段階にあります。
「DeepLearningはお金のある大企業や大学のやること」 今やそんなことはありません。 既にユーザレベルは個人にまで広がっており、 一般のモバイルアプリケーションに組み込むことも 可能なレベルに技術は達しています。
DeepLearningを使うことで、 今までにない機能をモバイルアプリケーションに 組み込むことができるかもしれません。 新しいユーザエクスペリエンスが誕生し、 ITの新しい市場となるかもしれません。 その可能性をDeepLearningは十分に秘めていて、 その先駆者となる可能性はまだ私達にもあるのです。
DeepLearningを学びたい 学生のための仮想研究室
登録はマルラボ公式サイトから! https://marulabo.net/ マルラボの取り組み DeepLearningを使った研究に 必要なマシンがない! 勉強したいが、なにを学べば いいかわからない! 最先端の研究者・技術者と 交流したい! MaruLaboが
学生に 無償で提供します!
DeepLearningに特化した 超火力マシンが2台! ① NVIDIA Tesla M40 4枚挿し ASKさん、NVIDIAさんからの寄贈品です ② GeForce
GTX TITAN X 4枚挿し さくらインターネットさんからの寄贈品です
孫泰蔵さんからも 寄贈予定! 近日中に、孫泰蔵さんからも 同等以上の性能のマシンを寄贈して いただけることになっています! このように、MaruLaboは多くの 企業や個人の方々にご支援いただき 運営しております!
多くのフレームワークが セットアップ済み! TensorFlow、Caffe、Torch、CNTKなど、 多くのフレームワークをセットアップしてあります。 セットアップのための技術や知識が要らないため、 DeepLearningへの敷居がグッと下がります。 特にTensorFlowはGPU性能を最大限に引き出すために、 私がCUDA 8.0とcuDNN 5.1用にソースコードから
カスタムビルドしてあります。
登録はマルラボ公式サイトから! https://marulabo.net/ オンライン勉強会も予定中! 初心者の学生向けに、MaruLaboメンバ限定でオ ンライン勉強会を開催予定です!
マシンの寄贈のお願い どんなに優秀であっても、今の日本の学生には DeepLearningの開発・学習のための環境がありません。 未来を担う学生の育成・研究のため、 ぜひご協力をお願いします。 お問い合わせは、公式サイトからお願いします。 https://marulabo.net/
ご清聴ありがとうございました facebookやってます 何かあればこちらまで 古川新 https://www.facebook.com/old.r.new
More Decks by Arata Furukawa
See All by Arata Furukawa
20251007: What happens when multi-agent systems become larger? (CyberAgent, Inc)
ornew
2
1.1k
2025-04-24 "Manga AI Understanding & Localization" Furukawa Arata (CyberAgent, Inc)
ornew
3
1.7k
TensorFlow Liteで機械学習Androidアプリを超簡単に作る
ornew
4
7.7k
みんなラズパイでTensorFlow Liteしよう?
ornew
2
2.6k
TensorFlowで作ったAIをAndroidアプリで実行する
ornew
0
1.8k
The Future of Mobile × ML
ornew
0
790
Let's use TensorFlow on Android!
ornew
0
620
TensorFlow on Mobile
ornew
0
200
The motion recognition from the sensor values for wearable terminal
ornew
0
130
Other Decks in Technology
See All in Technology
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
300
常時稼働エージェントの作り方(Claude公式ブログを資料化)
minorun365
PRO
16
28k
gradle-best-practices 使ってみた
mikanichinose
0
160
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
3
680
思考過程から秘密が漏れる:Amazon Bedrock上のKimi K3を5つの方法で攻めたら、25回中22回漏洩した話
yama3133
1
170
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
3
280
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
1
540
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
0
260
文書画像からの情報抽出を行うエージェントを、軌跡の正解データ無しで作れるか
sansantech
PRO
2
210
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
3.5k
会社説明資料_最新版
demaecan
0
32k
AI対話型分析を作成し、リリースするまでの話 / The Road to Release: Buiding AI Conversational Analytics
yappli_developers
0
170
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
30 Presentation Tips
portentint
PRO
1
470
Navigating Team Friction
lara
192
16k
Ruling the World: When Life Gets Gamed
codingconduct
0
440
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
BBQ
matthewcrist
90
10k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
For a Future-Friendly Web
brad_frost
184
11k
Typedesign – Prime Four
hannesfritz
42
3.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k