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
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
More Decks by Arata Furukawa
See All by Arata Furukawa
20251007: What happens when multi-agent systems become larger? (CyberAgent, Inc)
ornew
2
1k
2025-04-24 "Manga AI Understanding & Localization" Furukawa Arata (CyberAgent, Inc)
ornew
3
1.6k
TensorFlow Liteで機械学習Androidアプリを超簡単に作る
ornew
4
7.7k
みんなラズパイでTensorFlow Liteしよう?
ornew
2
2.5k
TensorFlowで作ったAIをAndroidアプリで実行する
ornew
0
1.8k
The Future of Mobile × ML
ornew
0
780
Let's use TensorFlow on Android!
ornew
0
610
TensorFlow on Mobile
ornew
0
190
The motion recognition from the sensor values for wearable terminal
ornew
0
120
Other Decks in Technology
See All in Technology
品質と信頼性を地続きにする
grimoh
0
380
2026_devsumi_ozono.pdf
o3
3
500
10分で知る最近のOmarchy
komagata
0
320
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
200
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
1.9k
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
Genieを崇めよ
kameitomohiro
0
130
あるけみー式LTスライド作成術
alchemy1115
1
210
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
21
12k
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
2
1.6k
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
160
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
200
Featured
See All Featured
A Soul's Torment
seathinner
8
3.6k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
エンジニアに許された特別な時間の終わり
watany
109
250k
What's in a price? How to price your products and services
michaelherold
247
13k
Navigating Team Friction
lara
192
16k
Become a Pro
speakerdeck
PRO
31
6.3k
Transcript
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