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
89
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MachineLearningInBrowserWithTensorFlowJs.pdf
Hiren Dave
October 12, 2019
Transcript
35 slides
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
More Decks by Hiren Dave
See All by Hiren Dave
Demystifying UI security
hirendave
0
55
Whats New in Web Platform from Google I/O 2022
hirendave
0
98
Introduction to Web3.0
hirendave
0
270
Using Vite with Laravel
hirendave
0
67
Step Into World of NodeJS
hirendave
0
53
Transfer Learning with TensorFlow
hirendave
0
83
Reactive Programming in Angular with RxJs
hirendave
0
91
AMP-lify your Web Apps
hirendave
0
44
Laravel Eloquent & Its Hidden Power
hirendave
0
140
Other Decks in Technology
See All in Technology
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
160
技術書典で本を売る流れ
yoshimura_datam
0
140
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
300
ワークフローからハーネスへ — Web フレームワークの作者たちが AI エージェントに向かう理由
azukiazusa1
2
1k
認知負荷の減らし方 ~開発にも日常業務にも活かせるノウハウ~
minorun365
PRO
17
10k
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
230
HTTP通信に使おうとすると実はめんどくさいfile_get_contents
maguroalternative
0
260
実測データからサービスの成長余力を測る。負荷シナリオ・テストデータ・限界値の設計
kazatohiei
0
170
Amazon Bedrock AgentCore の基礎とセキュリティ・ガバナンス
ren8k
0
270
Kiro のリモートワークスペース: IDE は手元のままで、ワークスペースをクラウド、コンテナ、自前のマシンに置く
inariku
PRO
1
190
AI-DLCでソフトウェア開発の速さは 上がったのか?
rfdnxbro
0
150
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
260
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
560
Skip the Path - Find Your Career Trail
mkilby
1
300
[SF Ruby Conf 2025] Rails X
palkan
3
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Typedesign – Prime Four
hannesfritz
42
3.2k
Crafting Experiences
bethany
1
460
Product Roadmaps are Hard
iamctodd
55
13k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
820
So, you think you're a good person
axbom
PRO
2
2.3k
Agile that works and the tools we love
rasmusluckow
331
22k
Code Reviewing Like a Champion
maltzj
529
40k