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
MachineLearningInBrowserWithTensorFlowJs.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hiren Dave
October 12, 2019
Technology
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MachineLearningInBrowserWithTensorFlowJs.pdf
Hiren Dave
October 12, 2019
More Decks by Hiren Dave
See All by Hiren Dave
Demystifying UI security
hirendave
0
52
Whats New in Web Platform from Google I/O 2022
hirendave
0
94
Introduction to Web3.0
hirendave
0
260
Using Vite with Laravel
hirendave
0
63
Step Into World of NodeJS
hirendave
0
53
Transfer Learning with TensorFlow
hirendave
0
81
Reactive Programming in Angular with RxJs
hirendave
0
88
AMP-lify your Web Apps
hirendave
0
40
Laravel Eloquent & Its Hidden Power
hirendave
0
140
Other Decks in Technology
See All in Technology
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.2k
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
5.1k
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
120
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
110
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
180
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
310
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
5
1.3k
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
740
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
200
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
200
Optunaの最新リリースv5.0について
pfn
PRO
0
120
Featured
See All Featured
A better future with KSS
kneath
240
18k
BBQ
matthewcrist
90
10k
Being A Developer After 40
akosma
92
590k
Are puppies a ranking factor?
jonoalderson
2
4.1k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Code Reviewing Like a Champion
maltzj
529
40k
Docker and Python
trallard
47
4.2k
エンジニアに許された特別な時間の終わり
watany
109
250k
Transcript
Hiren Dave Machine Learning in Browser With TensorFlow.js
What is a Machine Learning?
Data Training Prediction End Machine Learning in Simple Terms
Why ML in Browser?
Proprietary + Confidential No Drivers / No Installs Just Downloads
Source: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem $ python –v $ pip install pandas $ pip install django $ pip install numpy $ pip3 install flask $ pip install tensorflow $ pip install sklearn $ python –v $ pip install pandas $ pip install django $ pip install numpy $ pip3 install flask $ pip install tensorflow $ pip install sklearn <script src="https://cdn.jsdelivr.net/npm/@tensorflo w/
[email protected]
/dist/tf.min.js"></script>
Proprietary + Confidential Highly Interactive Source: Lorem ipsum dolor sit
amet, consectetur adipiscing elit. Duis non erat sem $ step 1 – loss – 5.0681 (10 sec/step) $ step 2 – loss – 5.0681 (10 sec/step) $ step 3 – loss – 5.0681 (10 sec/step) $ step 4 – loss – 5.0681 (10 sec/step) $ step 5 – loss – 5.0681 (10 sec/step) $ step 6 – loss – 5.0681 (10 sec/step) $ step 7 – loss – 5.0681 (10 sec/step) $ step 8 – loss – 5.0681 (10 sec/step)
Proprietary + Confidential Access to Sensors Source: Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Duis non erat sem GPS Microphone Camera Gyroscope
Proprietary + Confidential Can Work Offline / Data Privacy Source:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis non erat sem
Proprietary + Confidential Web Is Every Where Source: Lorem ipsum
dolor sit amet, consectetur adipiscing elit. Duis non erat sem
History of TensorFlow.js
deeplearn.js • Release in August 2017 • GPU Accerelerated via
WebGL • Allows Inference and Training in Browser
What it Offers?
With TensorFlow.js you can • Create models directly in browser
• Import pretrained models for inference • Retrain imported models
TensorFlow.js Architecture
Proprietary + Confidential API Layers API OPs API Browser WebGL
Keras Model TensorFlow Saved Model
A Quick Example
Let’s understand Basic Terms
What is a Tensor • It is n – dimensional
Array • Each element in Tensor has same data type • Retrain imported models
const tensor = tf.tensor(0.1).variable();
What is an Epoch? • When you have huge data
• Divide it in batches for training • Feed batches one by one for training • When all batches are done, that’s the EPOCH
What are the loss functions? • You have huge data
for training • Feed data one by one for training • How to ensure model’s output is correct • A loss function maps decisions to their associated costs.
Create / Load Model in Browser
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfj
[email protected]
/dist/tf.min.js"></script>
Using TensorFlow.js with NodeJs
npm install @tensorflow/tfjs-node
A Quick Example
Save Convert Load End Use Python Model with TensorFlow.js Python
TensorFlow.js
Use Existing Model
Let’s See Some ML Examples
Text Classification • Detect text toxicity • Use prebuilt model
Object Detection • Detect Object Through Webcam
Image Classification
TensorFlow.js Limitations
Hiren Dave, AbhayTech Solutions LLP. @hjdave Thank you!
Q&A