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
Mobile, AI and TensorFlow
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Supriya Srivatsa
October 05, 2017
Technology
0
610
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
650
The Story of Villagers, Marbles and Oh, A Blockchain!
supriyasrivatsa
0
630
Going Multiplatform With Kotlin
supriyasrivatsa
0
730
GIDS18_SupriyaSrivatsa.pdf
supriyasrivatsa
0
600
Other Decks in Technology
See All in Technology
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
210
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
270
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
4
13k
Phase01_AI座学_基礎
overflowinc
0
3.4k
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
110
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
110
Tebiki Engineering Team Deck
tebiki
0
27k
FastMCP OAuth Proxy with Cognito
hironobuiga
3
150
Phase12_総括_自走化
overflowinc
0
1.3k
Phase10_組織浸透_データ活用
overflowinc
0
1.4k
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
200
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
knj
0
230
Featured
See All Featured
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
160
Game over? The fight for quality and originality in the time of robots
wayneb77
1
140
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
300
Navigating Weather and Climate Data
rabernat
0
140
Utilizing Notion as your number one productivity tool
mfonobong
4
270
Navigating Team Friction
lara
192
16k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
160
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
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