Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mobile, AI and TensorFlow
Search
Supriya Srivatsa
October 05, 2017
Technology
0
590
Mobile, AI and TensorFlow
Supriya Srivatsa
October 05, 2017
Tweet
Share
More Decks by Supriya Srivatsa
See All by Supriya Srivatsa
Forgotten Histories
supriyasrivatsa
0
630
The Story of Villagers, Marbles and Oh, A Blockchain!
supriyasrivatsa
0
610
Going Multiplatform With Kotlin
supriyasrivatsa
0
710
GIDS18_SupriyaSrivatsa.pdf
supriyasrivatsa
0
570
Other Decks in Technology
See All in Technology
LayerX QA Night#1
koyaman2
0
210
re:Invent2025 3つの Frontier Agents を紹介 / introducing-3-frontier-agents
tomoki10
0
370
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
120
1人1サービス開発しているチームでのClaudeCodeの使い方
noayaoshiro
2
570
AIエージェント開発と活用を加速するワークフロー自動生成への挑戦
shibuiwilliam
4
810
[Data & AI Summit '25 Fall] AIでデータ活用を進化させる!Google Cloudで作るデータ活用の未来
kirimaru
0
730
100以上の新規コネクタ提供を可能にしたアーキテクチャ
ooyukioo
0
230
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
1.9k
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
380
M&Aで拡大し続けるGENDAのデータ活用を促すためのDatabricks権限管理 / AEON TECH HUB #22
genda
0
210
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.6k
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
105
220k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
We Have a Design System, Now What?
morganepeng
54
7.9k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
The Invisible Side of Design
smashingmag
302
51k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
100
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
First, design no harm
axbom
PRO
1
1.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
89
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Transcript
Mobile, AI and Tensorflow Supriya Srivatsa
None
None
NEURAL NETWORKS Human anatomy inspired learning network.
Neural Networks
Neural Networks
Neural Network – A Peek Inside
Deep Neural Network
PREDICTION AND INFERENCE How it works today. How it shall
work tomorrow.
“Transfer to Infer” Approach
Why On-Device Prediction • Data Privacy • Poor internet connections
• Questionable user experience
To The Rescue…
TensorFlow • Tensor: N Dimensional Arrays • Open source software
library for numerical computation using data flow graphs.
TensorFlow – Data Flow Graphs • Nodes represent mathematical functions
• Edges represent tensors.
Tensorflow – “Deferred Execution” Model • Graph first. Computation Afterward.
import tensorflow as tf x = tf.constant(10) y = tf.Variable(x + 5) print(y)
Tensorflow – “Deferred Execution” Model • Graph first. Computation Afterward.
import tensorflow as tf x = tf.constant(10) y = tf.Variable(x + 5) model = tf.global_variables_initializer() with tf.Session() as session: session.run(model) print(session.run(y))
None
None
Packaging the App and the Model
QUANTIZATION Compress. And Compress More.
Quantization • Round it up • Transform: round_weights • Compression
rates: ~8% => ~70% • Shrink down node names • Transform: obfuscate_names • Eight bit calculations
Quantization - Eight Bit Calculations
Quantization - Eight Bit Calculations
None
IMPLEMENTATION Code Away! ☺
Implementation build.gradle buildscript { repositories { jcenter() } dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' } }
Implementation 1. Load 2. Feed 3. Run 4. Fetch
Implementation 1. Load the model 2. Feed in the input
3. Run the model 4. Fetch the output TensorFlowInferenceInterface inferenceInterface = new TensorFlowInferenceInterface(assetManager, modelFile);
Implementation 1. Load the model 2. Feed in the input
3. Run the model 4. Fetch the output // feed(String s, float[] floats, long… longs) inferenceInterface.feed(inputName, floatValues, 1, inputSize, inputSize, 3);
Implementation 1. Load the model 2. Feed in the input
3. Run the model 4. Fetch the output inferenceInterface.run(outputNames);
Implementation 1. Load the model 2. Feed in the input
3. Run the model 4. Fetch the output // fetch(String s, float[] floats) inferenceInterface.fetch(outputName, outputs);
APPLICATIONS Awesomeness.
Google Translate
None
None