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
TesnsorFlowJs.pdf
Search
Hiren Dave
October 12, 2019
Technology
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TesnsorFlowJs.pdf
Hiren Dave
October 12, 2019
More Decks by Hiren Dave
See All by Hiren Dave
Demystifying UI security
hirendave
0
43
Whats New in Web Platform from Google I/O 2022
hirendave
0
84
Introduction to Web3.0
hirendave
0
260
Using Vite with Laravel
hirendave
0
58
Step Into World of NodeJS
hirendave
0
49
Transfer Learning with TensorFlow
hirendave
0
77
Reactive Programming in Angular with RxJs
hirendave
0
77
AMP-lify your Web Apps
hirendave
0
36
Laravel Eloquent & Its Hidden Power
hirendave
0
130
Other Decks in Technology
See All in Technology
Tab5をRubyで動くパソコンにする
kishima
1
190
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
130
現場に行くだけでは足りない——プロダクトエンジニアが業務の流れを捉える観点と、その鍛え方
takumiengineering
0
300
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
150
AI時代におけるプロダクト横断勉強会の設計
zozotech
PRO
0
160
Gleamアップデート情報 2026
comamoca
0
100
Genie Code ワークショップ 基礎編 / Genie-Code-Workshop-fundamental
databricksjapan
PRO
0
360
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
0
190
20260906 「AWS運用入門」著者が教える、運用業務への生成AI活用入門
masaruogura
0
230
DGX Sparkを2台使って いろいろ動かす話
sonoda_mj
1
130
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
110
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
260
Featured
See All Featured
From π to Pie charts
rasagy
0
350
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Building the Perfect Custom Keyboard
takai
2
860
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
260
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
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