SlideShare a Scribd company logo
1 of 9
Download to read offline
TinyML: TFLite for
Microcontrollers
Robert John
GDE ML & GCP
@robert_thas
Machine Learning on Embedded Edge Devices
Why Machine Learning?
Learning from example: activity detection, pet
classification
● We can’t write rules for everything
● We produce enough data for our examples
● We have powerful machines for training
Why Embedded Edge Devices?
Some computers do only one thing!
● Placed in hard-to-reach places
● Run on batteries
● Replaced once a year or even longer
● No keyboard or mouse
● Rely on sensors or inputs from other microcontrollers
● Control other microcontrollers or other outputs
● Smart temperature example
Sensors on Edge Devices
More sensors than the average computer
● Motion sensors
● Biometric sensors
● Acoustic sensors
● Environmental sensors
● Force sensors
Constraints on Edge Devices
Can’t eat your cake and have it
Raspberry Pi Pico HP Chromebook
(Celeron)
Raspberry Pi 4
Classification Microcontroller Personal Computer Single-Board Computer
Microprocessor RP2040 Celeron BCM2711
Processor Designer Raspberry Intel Broadcom
ISA Family Arm Cortex-M0+ IA32 (32-bit x86) Arm Cortex-A72
Clock speed 133MHz 3.5 GHz 1.5 GHz
RAM 264 KB 4GB/8GB 2GB/4GB/8GB
Storage 2MB Flash HDD/SSD HDD/SSD
Inputs GPIO Serial Keyboard/Mouse Keyboard/Mouse
Outputs GPIO Serial Monitor/Speakers Monitor/Speakers
Edge ML Deployment Challenges
Inference is all you need!
● Pre-trained models are hard to fit into MCUs
● No OS to act as hardware buffer
● Mobile-optimized models might use instructions not present on MCU
● Need to understand the underlying ISA
● Floating-point arithmetic usually not present
● Model is task specific, no need classify 1000 images!
● Might need to start from scratch!!
● Need to know Python and C/C++
Keep It Simple!
You only need inference!
● The model should only be as large as it needs to be to guaranty the required
accuracy
● Leverage quantization-aware training to avoid model degradation
● Implement post-training quantization to shrink models from floating-point
(32-bit) to integer (8-bit)
● It’s okay to lose a little bit of context during inference
Learn More
Important Resources
● TensorFlow: https://www.tensorflow.org/
● TensorFlow Lite: https://www.tensorflow.org/lite
● TFLu: https://www.tensorflow.org/lite/microcontrollers
● TinyML Foundation: https://www.tinyml.org/
● TinyML Course on EdX:
https://www.edx.org/professional-certificate/harvardx-tiny-machine-learning
● Embedded Systems Essentials:
https://www.edx.org/professional-certificate/armeducationx-embedded-systems-essentials
●
Thank You!
Robert John
GDE ML & GCP
@robert_thas

More Related Content

What's hot

Intelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applicationsIntelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applications
Jan Jongboom
 
“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...
“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...
“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...
Edge AI and Vision Alliance
 

What's hot (20)

Introduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga Petrova
 
Prompting is an art / Sztuka promptowania
Prompting is an art / Sztuka promptowaniaPrompting is an art / Sztuka promptowania
Prompting is an art / Sztuka promptowania
 
How does ChatGPT work: an Information Retrieval perspective
How does ChatGPT work: an Information Retrieval perspectiveHow does ChatGPT work: an Information Retrieval perspective
How does ChatGPT work: an Information Retrieval perspective
 
Machine Learning and Internet of Things
Machine Learning and Internet of ThingsMachine Learning and Internet of Things
Machine Learning and Internet of Things
 
Generative models
Generative modelsGenerative models
Generative models
 
Intelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applicationsIntelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applications
 
AI at the Edge
AI at the EdgeAI at the Edge
AI at the Edge
 
Tutorial on end-to-end text-to-speech synthesis: Part 1 – Neural waveform mod...
Tutorial on end-to-end text-to-speech synthesis: Part 1 – Neural waveform mod...Tutorial on end-to-end text-to-speech synthesis: Part 1 – Neural waveform mod...
Tutorial on end-to-end text-to-speech synthesis: Part 1 – Neural waveform mod...
 
TinyML on Arduino - workshop
TinyML on Arduino - workshopTinyML on Arduino - workshop
TinyML on Arduino - workshop
 
IOT gateways.pptx
IOT gateways.pptxIOT gateways.pptx
IOT gateways.pptx
 
Deep Learning State of the Art (2020)
Deep Learning State of the Art (2020)Deep Learning State of the Art (2020)
Deep Learning State of the Art (2020)
 
Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU
 
Customizing LLMs
Customizing LLMsCustomizing LLMs
Customizing LLMs
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPT
 
Chat Generative Pre-Trained Transformer: An Overview
Chat Generative Pre-Trained Transformer: An OverviewChat Generative Pre-Trained Transformer: An Overview
Chat Generative Pre-Trained Transformer: An Overview
 
Hardware Acceleration for Machine Learning
Hardware Acceleration for Machine LearningHardware Acceleration for Machine Learning
Hardware Acceleration for Machine Learning
 
IA 101 - Introduction to Artificial Intelligence
IA 101 - Introduction to Artificial Intelligence IA 101 - Introduction to Artificial Intelligence
IA 101 - Introduction to Artificial Intelligence
 
“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...
“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...
“Powering the Connected Intelligent Edge and the Future of On-Device AI,” a P...
 
Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0
 
BeagleBone black
BeagleBone blackBeagleBone black
BeagleBone black
 

Similar to TinyML: Machine Learning for Microcontrollers

BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
Ron Munitz
 

Similar to TinyML: Machine Learning for Microcontrollers (20)

Choose your dev platform
Choose your dev platformChoose your dev platform
Choose your dev platform
 
2019 04-23-tf lite-avid-f
2019 04-23-tf lite-avid-f2019 04-23-tf lite-avid-f
2019 04-23-tf lite-avid-f
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 
Lect 1 Into.pptx
Lect 1 Into.pptxLect 1 Into.pptx
Lect 1 Into.pptx
 
Micro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application DevelopmentMicro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application Development
 
MicroPython&electronics prezentācija
MicroPython&electronics prezentācija MicroPython&electronics prezentācija
MicroPython&electronics prezentācija
 
Fluent-bit
Fluent-bitFluent-bit
Fluent-bit
 
Solving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With DockerSolving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With Docker
 
Embedded Linux Systems Basics
Embedded Linux Systems BasicsEmbedded Linux Systems Basics
Embedded Linux Systems Basics
 
What is a microcontroller
What is a microcontrollerWhat is a microcontroller
What is a microcontroller
 
Arduino Hands-on Workshop
Arduino Hands-on WorkshopArduino Hands-on Workshop
Arduino Hands-on Workshop
 
Introduction to Firmware
Introduction to FirmwareIntroduction to Firmware
Introduction to Firmware
 
Arduino
ArduinoArduino
Arduino
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 
Presentation
PresentationPresentation
Presentation
 
Building Trojan Hardware at Home
Building Trojan Hardware at HomeBuilding Trojan Hardware at Home
Building Trojan Hardware at Home
 
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
 
Java 101 @ chattahoochee
Java 101 @ chattahoocheeJava 101 @ chattahoochee
Java 101 @ chattahoochee
 
2015 01 24 Coding4Fun at Tajamar
2015 01 24 Coding4Fun at Tajamar2015 01 24 Coding4Fun at Tajamar
2015 01 24 Coding4Fun at Tajamar
 
lecture2-mcu_and_io.pdf
lecture2-mcu_and_io.pdflecture2-mcu_and_io.pdf
lecture2-mcu_and_io.pdf
 

More from Robert John

More from Robert John (8)

DevFest 2022 Nairobi - Considerations for Deploying ML Models on Edge Devices...
DevFest 2022 Nairobi - Considerations for Deploying ML Models on Edge Devices...DevFest 2022 Nairobi - Considerations for Deploying ML Models on Edge Devices...
DevFest 2022 Nairobi - Considerations for Deploying ML Models on Edge Devices...
 
DevFest 2022 - Nairobi ML Keynote.pptx
DevFest 2022 - Nairobi ML Keynote.pptxDevFest 2022 - Nairobi ML Keynote.pptx
DevFest 2022 - Nairobi ML Keynote.pptx
 
Arduino Certification
Arduino CertificationArduino Certification
Arduino Certification
 
Fundamentals of cloud computing
Fundamentals of cloud computingFundamentals of cloud computing
Fundamentals of cloud computing
 
Baby Steps to Machine Learning at DevFest Lagos 2019
Baby Steps to Machine Learning at DevFest Lagos 2019Baby Steps to Machine Learning at DevFest Lagos 2019
Baby Steps to Machine Learning at DevFest Lagos 2019
 
What is TensorFlow and why do we use it
What is TensorFlow and why do we use itWhat is TensorFlow and why do we use it
What is TensorFlow and why do we use it
 
What is Google Cloud Good For at DevFestInspire 2021
What is Google Cloud Good For at DevFestInspire 2021What is Google Cloud Good For at DevFestInspire 2021
What is Google Cloud Good For at DevFestInspire 2021
 
TinyML at DevFestLagos21
TinyML at DevFestLagos21TinyML at DevFestLagos21
TinyML at DevFestLagos21
 

Recently uploaded

Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get CytotecAbortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
uodye
 
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
Obat Cytotec
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
wsppdmt
 
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Obat Aborsi 088980685493 Jual Obat Aborsi
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
wpkuukw
 
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy CytotecAbortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
wpkuukw
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
uodye
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
uodye
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
wpkuukw
 
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
vwymvu
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
ayoqf
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
wpkuukw
 
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotecAbortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 

Recently uploaded (20)

Abortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get CytotecAbortion Pills in Jeddah |+966572737505 | Get Cytotec
Abortion Pills in Jeddah |+966572737505 | Get Cytotec
 
Test bank for consumer behaviour buying having and being eighth canadian edit...
Test bank for consumer behaviour buying having and being eighth canadian edit...Test bank for consumer behaviour buying having and being eighth canadian edit...
Test bank for consumer behaviour buying having and being eighth canadian edit...
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
£ HAMIL 5 BULAN £ CARA MENGGUGURKAN KANDUNGAN USIA 5 BULAN ((087776558899))
 
NON INVASIVE GLUCOSE BLODD MONITORING SYSTEM (1) (2) (1).pptx
NON INVASIVE GLUCOSE BLODD MONITORING SYSTEM (1) (2) (1).pptxNON INVASIVE GLUCOSE BLODD MONITORING SYSTEM (1) (2) (1).pptx
NON INVASIVE GLUCOSE BLODD MONITORING SYSTEM (1) (2) (1).pptx
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
如何办理(USYD毕业证书)悉尼大学毕业证成绩单原件一模一样
 
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
 
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy CytotecAbortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy Cytotec
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
Dell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdf
Dell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdfDell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdf
Dell Inspiron 15 5567 BAL20 LA-D801P Rev 1.0 (A00) Schematics.pdf
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
办理(uw学位证书)美国华盛顿大学毕业证续费收据一模一样
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
 
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotecAbortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
Abortion pills in Riyadh Saudi Arabia!+966572737505 ) Where to get cytotec
 

TinyML: Machine Learning for Microcontrollers

  • 1. TinyML: TFLite for Microcontrollers Robert John GDE ML & GCP @robert_thas Machine Learning on Embedded Edge Devices
  • 2. Why Machine Learning? Learning from example: activity detection, pet classification ● We can’t write rules for everything ● We produce enough data for our examples ● We have powerful machines for training
  • 3. Why Embedded Edge Devices? Some computers do only one thing! ● Placed in hard-to-reach places ● Run on batteries ● Replaced once a year or even longer ● No keyboard or mouse ● Rely on sensors or inputs from other microcontrollers ● Control other microcontrollers or other outputs ● Smart temperature example
  • 4. Sensors on Edge Devices More sensors than the average computer ● Motion sensors ● Biometric sensors ● Acoustic sensors ● Environmental sensors ● Force sensors
  • 5. Constraints on Edge Devices Can’t eat your cake and have it Raspberry Pi Pico HP Chromebook (Celeron) Raspberry Pi 4 Classification Microcontroller Personal Computer Single-Board Computer Microprocessor RP2040 Celeron BCM2711 Processor Designer Raspberry Intel Broadcom ISA Family Arm Cortex-M0+ IA32 (32-bit x86) Arm Cortex-A72 Clock speed 133MHz 3.5 GHz 1.5 GHz RAM 264 KB 4GB/8GB 2GB/4GB/8GB Storage 2MB Flash HDD/SSD HDD/SSD Inputs GPIO Serial Keyboard/Mouse Keyboard/Mouse Outputs GPIO Serial Monitor/Speakers Monitor/Speakers
  • 6. Edge ML Deployment Challenges Inference is all you need! ● Pre-trained models are hard to fit into MCUs ● No OS to act as hardware buffer ● Mobile-optimized models might use instructions not present on MCU ● Need to understand the underlying ISA ● Floating-point arithmetic usually not present ● Model is task specific, no need classify 1000 images! ● Might need to start from scratch!! ● Need to know Python and C/C++
  • 7. Keep It Simple! You only need inference! ● The model should only be as large as it needs to be to guaranty the required accuracy ● Leverage quantization-aware training to avoid model degradation ● Implement post-training quantization to shrink models from floating-point (32-bit) to integer (8-bit) ● It’s okay to lose a little bit of context during inference
  • 8. Learn More Important Resources ● TensorFlow: https://www.tensorflow.org/ ● TensorFlow Lite: https://www.tensorflow.org/lite ● TFLu: https://www.tensorflow.org/lite/microcontrollers ● TinyML Foundation: https://www.tinyml.org/ ● TinyML Course on EdX: https://www.edx.org/professional-certificate/harvardx-tiny-machine-learning ● Embedded Systems Essentials: https://www.edx.org/professional-certificate/armeducationx-embedded-systems-essentials ●
  • 9. Thank You! Robert John GDE ML & GCP @robert_thas