SlideShare a Scribd company logo
Lars Gregori, SAP CX
September 30, 2019
uTensor

Embedded Devices And Machine Learning Models
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "2
SpeedAvailabilityPrivacy
Why?
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "3
• Energy is the limiting factor
• CPUs and sensors use almost no power
• radios and displays use lots
• We capture much more sensor data than we use
Why the Future of Deep Learning is Tiny
https://petewarden.com/2018/06/11/why-the-future-of-machine-learning-is-tiny/
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "4
“ML on tiny, cheap battery 

powered chips is coming 

and will open the door for 

some amazing new applications!”
-- Pete Warden
uTensor - embedded devices and machine learning models
uTensor - embedded devices and machine learning models
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "7
IoT Gateway
(credit: http://sappress.de/4795)
Agenda
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "9
Machine Learning Models
uTensor + Code
Examples
Agenda
Machine Learning Models
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "11
XOR
input_a input_b output
0 0 0
0 1 1
1 0 1
1 1 0
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "12
1. XOR model with Keras
2. XOR model with TensorFlow
3. MNIST model with TensorFlow
Machine Learning Models
https://github.com/choas/utensor_examples
MNIST:
Jupyter Notebooks
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "14
TensorBoard - XOR model (Keras)
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "15
TensorBoard - XOR model (Keras)
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "16
step 17000, training accuracy 0.94
step 18000, training accuracy 0.94
step 19000, training accuracy 0.9
step 20000, training accuracy 0.86
test accuracy 0.9272
step 97000, training accuracy 0.97
step 98000, training accuracy 0.96
step 99000, training accuracy 1
step 100000, training accuracy 0.97
test accuracy 0.9546
MNIST training (20,000 steps and 100,000 steps)
training steps don’t influence the model size
size:
• # layers
• # nodes
• value type (e.g. float, int)
Code
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "18
uTensor
https://github.com/uTensor/uTensor
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "19
• Add
• ArgMax
• Dropout
• MatMal
• Max
• Min
• Placeholder
• Quantization Ops
• ReLu
• Reshape
uTensor - What is supported?
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "20
ARM Mbed OS 5
https://os.mbed.com/docs/mbed-os/v5.12/introduction/index.html
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "21
{
ctx.add(new RamTensor<int>(), "y_pred:0");
ctx.push(new ArgMaxOp<float, int>(),
{ "add_1:0", "y_pred/dimension:0" },
{ "y_pred:0" });
}
Code
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "22
const float inline_Variable_2_0 [ 20 ] = {
-0.07518502, -0.094865195, -2.2947302, 2.420463, -0.39691946,
0.2372103, 1.1672685, -1.1217928, -1.3336784, 1.2321934, 

-2.725729, 2.5416267, 0.8984613, -1.0757952, -0.064421736, 

-0.10880947, 0.57309926, -0.8162274, -0.01253005, -0.038079493
};
Code (weight and bias)
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "23
Elf2Bin: XOR
| Module | .text | .data | .bss |
|--------------------|-----------------|-------------|---------------|
| [fill] | 530 | 7 | 32 |
| [lib]/c.a | 69431 | 2548 | 127 |
| [lib]/gcc.a | 7456 | 0 | 0 |
| [lib]/m.a | 788 | 0 | 0 |
| [lib]/misc | 252 | 16 | 28 |
| [lib]/nosys.a | 32 | 0 | 0 |
| [lib]/stdc++.a | 173167 | 165 | 5676 |
| main.o | 1558 | 4 | 321 |
| mbed-os/cmsis | 1033 | 0 | 0 |
| mbed-os/components | 78 | 0 | 0 |
| mbed-os/drivers | 976 | 0 | 0 |
| mbed-os/hal | 1432 | 4 | 66 |
| mbed-os/platform | 4215 | 260 | 253 |
| mbed-os/rtos | 7243 | 168 | 5973 |
| mbed-os/targets | 6709 | 4 | 364 |
| models/xor_relu.o | 23342 | 4 | 1 |
| uTensor/uTensor | 6709 | 28 | 7 |
| Subtotals | 304951 | 3208 | 12848 |
Total Static RAM memory (data + bss): 16056 bytes
Total Flash memory (text + data): 308159 bytes
Binary XOR
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "24
Elf2Bin: MNIST_LCD
| Module | .text | .data | .bss |
|----------------------------------------|---------------|-------------|---------------|
| DISCO_L476VG_GlassLCD/BSP_DISCO_L476VG | 1960 | 0 | 76 |
| DISCO_L476VG_GlassLCD/LCD_DISCO_L476VG | 34 | 0 | 0 |
| [fill] | 553 | 3 | 42 |
| [lib]/c.a | 68359 | 2548 | 127 |
| [lib]/gcc.a | 7456 | 0 | 0 |
| [lib]/m.a | 788 | 0 | 0 |
| [lib]/misc | 252 | 16 | 28 |
| [lib]/nosys.a | 32 | 0 | 0 |
| [lib]/stdc++.a | 173167 | 165 | 5676 |
| main.o | 4424 | 4 | 30 |
| mbed-os/cmsis | 1033 | 0 | 84 |
| mbed-os/components | 156 | 4 | 4 |
| mbed-os/drivers | 692 | 4 | 100 |
| mbed-os/hal | 2734 | 8 | 247 |
| mbed-os/platform | 2021 | 256 | 136 |
| mbed-os/rtos | 7678 | 168 | 6289 |
| mbed-os/targets | 12882 | 8 | 913 |
| models/deep_mlp.o | 138837 | 4 | 1 |
| uTensor/uTensor | 6709 | 28 | 7 |
| Subtotals | 429767 | 3216 | 13760 |
Total Static RAM memory (data + bss): 16976 bytes
Total Flash memory (text + data): 432983 bytes
Binary MNIST_LCD
Examples
uTensor - embedded devices and machine learning models
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "27
NUCLEO-F411RE

https://os.mbed.com/platforms/ST-Nucleo-F411RE/
DISCO-L476VG

https://os.mbed.com/platforms/ST-Discovery-L476VG/
DISCO-F413ZH

https://os.mbed.com/platforms/ST-Discovery-F413H/
Hardware
Future
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "29
uTensor is young and under going rapid development. 

Many exciting features are on the way:
• Convolution
• Pooling
• CMSIS-NN integration (https://arm-software.github.io/CMSIS_5/NN/html/index.html)
• Smaller binary
• More efficient Run-time
uTensor README.MD
https://twitter.com/zach_shelby/status/1126176019449147392
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "31
• Why
• Machine Learning Models
• uTensor
• C++ code
• TensorFlow Lite Micro
Summary
Contact information:
Lars Gregori
@choas
Thank you.
Ad

More Related Content

Similar to uTensor - embedded devices and machine learning models (20)

Operating System Practice : Meeting1.0 learning contract
Operating System Practice : Meeting1.0 learning contractOperating System Practice : Meeting1.0 learning contract
Operating System Practice : Meeting1.0 learning contract
Syaiful Ahdan
 
Hitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning toolsHitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning tools
Bjoern Rost
 
Ml ops on AWS
Ml ops on AWSMl ops on AWS
Ml ops on AWS
PhilipBasford
 
I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...
I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...
I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...
Apigee | Google Cloud
 
Cs6703 grid and cloud computing Study material
Cs6703 grid and cloud computing Study materialCs6703 grid and cloud computing Study material
Cs6703 grid and cloud computing Study material
kaleeswaranme
 
Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018
Karthik Murugesan
 
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Costanoa Ventures
 
02 ansible automateskeynote-jakarta
02 ansible automateskeynote-jakarta02 ansible automateskeynote-jakarta
02 ansible automateskeynote-jakarta
Khairul Zebua
 
ML-Ops: Philosophy, Best-Practices and Tools
ML-Ops:Philosophy, Best-Practices and ToolsML-Ops:Philosophy, Best-Practices and Tools
ML-Ops: Philosophy, Best-Practices and Tools
Jorge Davila-Chacon
 
DevOps Digital Transformation: A real life use case enabled by Alien4Cloud
DevOps Digital Transformation: A real life use case enabled by Alien4CloudDevOps Digital Transformation: A real life use case enabled by Alien4Cloud
DevOps Digital Transformation: A real life use case enabled by Alien4Cloud
Cloudify Community
 
DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018
DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018
DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018
DevOpsGroup
 
Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry Pi
Eueung Mulyana
 
Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...
Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...
Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...
Certus Solutions
 
SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure
SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure
SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure
Christian Lechner
 
Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...
Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...
Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...
Codemotion
 
Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...
Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...
Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...
Carol McDonald
 
Teaching Machine Learning with Physical Computing - July 2023
Teaching Machine Learning with Physical Computing - July 2023Teaching Machine Learning with Physical Computing - July 2023
Teaching Machine Learning with Physical Computing - July 2023
Hal Speed
 
DevCamp - What can the cloud do for me
DevCamp - What can the cloud do for meDevCamp - What can the cloud do for me
DevCamp - What can the cloud do for me
Chris Dufour
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIs
Cisco DevNet
 
Implementing and running a secure datalake from the trenches
Implementing and running a secure datalake from the trenches Implementing and running a secure datalake from the trenches
Implementing and running a secure datalake from the trenches
DataWorks Summit
 
Operating System Practice : Meeting1.0 learning contract
Operating System Practice : Meeting1.0 learning contractOperating System Practice : Meeting1.0 learning contract
Operating System Practice : Meeting1.0 learning contract
Syaiful Ahdan
 
Hitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning toolsHitchhiker's Guide to free Oracle tuning tools
Hitchhiker's Guide to free Oracle tuning tools
Bjoern Rost
 
I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...
I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...
I Love APIs 2015: Apache Usergrid Web Scale Mobile APIs with Elastic Search a...
Apigee | Google Cloud
 
Cs6703 grid and cloud computing Study material
Cs6703 grid and cloud computing Study materialCs6703 grid and cloud computing Study material
Cs6703 grid and cloud computing Study material
kaleeswaranme
 
Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018
Karthik Murugesan
 
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Using Machine Learning & Artificial Intelligence to Create Impactful Customer...
Costanoa Ventures
 
02 ansible automateskeynote-jakarta
02 ansible automateskeynote-jakarta02 ansible automateskeynote-jakarta
02 ansible automateskeynote-jakarta
Khairul Zebua
 
ML-Ops: Philosophy, Best-Practices and Tools
ML-Ops:Philosophy, Best-Practices and ToolsML-Ops:Philosophy, Best-Practices and Tools
ML-Ops: Philosophy, Best-Practices and Tools
Jorge Davila-Chacon
 
DevOps Digital Transformation: A real life use case enabled by Alien4Cloud
DevOps Digital Transformation: A real life use case enabled by Alien4CloudDevOps Digital Transformation: A real life use case enabled by Alien4Cloud
DevOps Digital Transformation: A real life use case enabled by Alien4Cloud
Cloudify Community
 
DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018
DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018
DevOpsGuys - Cloud Adoption Frameworks - IPExpo April 2018
DevOpsGroup
 
Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry Pi
Eueung Mulyana
 
Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...
Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...
Melbourne: Certus Data 2.0 Vault Meetup with Snowflake - Data Vault In The Cl...
Certus Solutions
 
SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure
SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure
SAP Inside Track Hamburg 2019 - Side-by-Side Extensibility with Microsoft Azure
Christian Lechner
 
Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...
Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...
Fast Cars, Big Data - How Streaming Can Help Formula 1 - Tugdual Grall - Code...
Codemotion
 
Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...
Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...
Applying Machine learning to IOT: End to End Distributed Distributed Pipeline...
Carol McDonald
 
Teaching Machine Learning with Physical Computing - July 2023
Teaching Machine Learning with Physical Computing - July 2023Teaching Machine Learning with Physical Computing - July 2023
Teaching Machine Learning with Physical Computing - July 2023
Hal Speed
 
DevCamp - What can the cloud do for me
DevCamp - What can the cloud do for meDevCamp - What can the cloud do for me
DevCamp - What can the cloud do for me
Chris Dufour
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIs
Cisco DevNet
 
Implementing and running a secure datalake from the trenches
Implementing and running a secure datalake from the trenches Implementing and running a secure datalake from the trenches
Implementing and running a secure datalake from the trenches
DataWorks Summit
 

More from Lars Gregori (20)

BYOM - Bring Your Own Model
BYOM - Bring Your Own ModelBYOM - Bring Your Own Model
BYOM - Bring Your Own Model
Lars Gregori
 
SAP Leonardo Machine Learning
SAP Leonardo Machine LearningSAP Leonardo Machine Learning
SAP Leonardo Machine Learning
Lars Gregori
 
Minecraft and reinforcement learning
Minecraft and reinforcement learningMinecraft and reinforcement learning
Minecraft and reinforcement learning
Lars Gregori
 
Machine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesMachine Learning Models on Mobile Devices
Machine Learning Models on Mobile Devices
Lars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
Lars Gregori
 
IoT protocolls - smart washing machine
IoT protocolls - smart washing machineIoT protocolls - smart washing machine
IoT protocolls - smart washing machine
Lars Gregori
 
[DE] AI und Minecraft
[DE] AI und Minecraft[DE] AI und Minecraft
[DE] AI und Minecraft
Lars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
Lars Gregori
 
[DE] IoT Protokolle
[DE] IoT Protokolle[DE] IoT Protokolle
[DE] IoT Protokolle
Lars Gregori
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile device
Lars Gregori
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile device
Lars Gregori
 
AI and Minecraft
AI and MinecraftAI and Minecraft
AI and Minecraft
Lars Gregori
 
[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping
Lars Gregori
 
IoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDIoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-RED
Lars Gregori
 
Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?   Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?
Lars Gregori
 
Embedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devicesEmbedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devices
Lars Gregori
 
Embedded Rust on IoT devices
Embedded Rust on IoT devicesEmbedded Rust on IoT devices
Embedded Rust on IoT devices
Lars Gregori
 
IoT mit Rust programmieren
IoT mit Rust programmierenIoT mit Rust programmieren
IoT mit Rust programmieren
Lars Gregori
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-Prototyping
Lars Gregori
 
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Lars Gregori
 
BYOM - Bring Your Own Model
BYOM - Bring Your Own ModelBYOM - Bring Your Own Model
BYOM - Bring Your Own Model
Lars Gregori
 
SAP Leonardo Machine Learning
SAP Leonardo Machine LearningSAP Leonardo Machine Learning
SAP Leonardo Machine Learning
Lars Gregori
 
Minecraft and reinforcement learning
Minecraft and reinforcement learningMinecraft and reinforcement learning
Minecraft and reinforcement learning
Lars Gregori
 
Machine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesMachine Learning Models on Mobile Devices
Machine Learning Models on Mobile Devices
Lars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
Lars Gregori
 
IoT protocolls - smart washing machine
IoT protocolls - smart washing machineIoT protocolls - smart washing machine
IoT protocolls - smart washing machine
Lars Gregori
 
[DE] AI und Minecraft
[DE] AI und Minecraft[DE] AI und Minecraft
[DE] AI und Minecraft
Lars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
Lars Gregori
 
[DE] IoT Protokolle
[DE] IoT Protokolle[DE] IoT Protokolle
[DE] IoT Protokolle
Lars Gregori
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile device
Lars Gregori
 
Using a trained model on your mobile device
Using a trained model on your mobile deviceUsing a trained model on your mobile device
Using a trained model on your mobile device
Lars Gregori
 
[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping[German] Boards für das IoT-Prototyping
[German] Boards für das IoT-Prototyping
Lars Gregori
 
IoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-REDIoT, APIs und Microservices - alles unter Node-RED
IoT, APIs und Microservices - alles unter Node-RED
Lars Gregori
 
Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?   Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?
Lars Gregori
 
Embedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devicesEmbedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devices
Lars Gregori
 
Embedded Rust on IoT devices
Embedded Rust on IoT devicesEmbedded Rust on IoT devices
Embedded Rust on IoT devices
Lars Gregori
 
IoT mit Rust programmieren
IoT mit Rust programmierenIoT mit Rust programmieren
IoT mit Rust programmieren
Lars Gregori
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-Prototyping
Lars Gregori
 
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?Groß steuert klein - Wie lässt sich ein Arduino steuern?
Groß steuert klein - Wie lässt sich ein Arduino steuern?
Lars Gregori
 
Ad

Recently uploaded (20)

Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
CSUC - Consorci de Serveis Universitaris de Catalunya
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
Ad

uTensor - embedded devices and machine learning models

  • 1. Lars Gregori, SAP CX September 30, 2019 uTensor
 Embedded Devices And Machine Learning Models
  • 2. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "2 SpeedAvailabilityPrivacy Why?
  • 3. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "3 • Energy is the limiting factor • CPUs and sensors use almost no power • radios and displays use lots • We capture much more sensor data than we use Why the Future of Deep Learning is Tiny https://petewarden.com/2018/06/11/why-the-future-of-machine-learning-is-tiny/
  • 4. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "4 “ML on tiny, cheap battery 
 powered chips is coming 
 and will open the door for 
 some amazing new applications!” -- Pete Warden
  • 7. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "7 IoT Gateway (credit: http://sappress.de/4795)
  • 9. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "9 Machine Learning Models uTensor + Code Examples Agenda
  • 11. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "11 XOR input_a input_b output 0 0 0 0 1 1 1 0 1 1 1 0
  • 12. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "12 1. XOR model with Keras 2. XOR model with TensorFlow 3. MNIST model with TensorFlow Machine Learning Models https://github.com/choas/utensor_examples MNIST:
  • 14. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "14 TensorBoard - XOR model (Keras)
  • 15. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "15 TensorBoard - XOR model (Keras)
  • 16. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "16 step 17000, training accuracy 0.94 step 18000, training accuracy 0.94 step 19000, training accuracy 0.9 step 20000, training accuracy 0.86 test accuracy 0.9272 step 97000, training accuracy 0.97 step 98000, training accuracy 0.96 step 99000, training accuracy 1 step 100000, training accuracy 0.97 test accuracy 0.9546 MNIST training (20,000 steps and 100,000 steps) training steps don’t influence the model size size: • # layers • # nodes • value type (e.g. float, int)
  • 17. Code
  • 18. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "18 uTensor https://github.com/uTensor/uTensor
  • 19. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "19 • Add • ArgMax • Dropout • MatMal • Max • Min • Placeholder • Quantization Ops • ReLu • Reshape uTensor - What is supported?
  • 20. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "20 ARM Mbed OS 5 https://os.mbed.com/docs/mbed-os/v5.12/introduction/index.html
  • 21. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "21 { ctx.add(new RamTensor<int>(), "y_pred:0"); ctx.push(new ArgMaxOp<float, int>(), { "add_1:0", "y_pred/dimension:0" }, { "y_pred:0" }); } Code
  • 22. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "22 const float inline_Variable_2_0 [ 20 ] = { -0.07518502, -0.094865195, -2.2947302, 2.420463, -0.39691946, 0.2372103, 1.1672685, -1.1217928, -1.3336784, 1.2321934, 
 -2.725729, 2.5416267, 0.8984613, -1.0757952, -0.064421736, 
 -0.10880947, 0.57309926, -0.8162274, -0.01253005, -0.038079493 }; Code (weight and bias)
  • 23. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "23 Elf2Bin: XOR | Module | .text | .data | .bss | |--------------------|-----------------|-------------|---------------| | [fill] | 530 | 7 | 32 | | [lib]/c.a | 69431 | 2548 | 127 | | [lib]/gcc.a | 7456 | 0 | 0 | | [lib]/m.a | 788 | 0 | 0 | | [lib]/misc | 252 | 16 | 28 | | [lib]/nosys.a | 32 | 0 | 0 | | [lib]/stdc++.a | 173167 | 165 | 5676 | | main.o | 1558 | 4 | 321 | | mbed-os/cmsis | 1033 | 0 | 0 | | mbed-os/components | 78 | 0 | 0 | | mbed-os/drivers | 976 | 0 | 0 | | mbed-os/hal | 1432 | 4 | 66 | | mbed-os/platform | 4215 | 260 | 253 | | mbed-os/rtos | 7243 | 168 | 5973 | | mbed-os/targets | 6709 | 4 | 364 | | models/xor_relu.o | 23342 | 4 | 1 | | uTensor/uTensor | 6709 | 28 | 7 | | Subtotals | 304951 | 3208 | 12848 | Total Static RAM memory (data + bss): 16056 bytes Total Flash memory (text + data): 308159 bytes Binary XOR
  • 24. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "24 Elf2Bin: MNIST_LCD | Module | .text | .data | .bss | |----------------------------------------|---------------|-------------|---------------| | DISCO_L476VG_GlassLCD/BSP_DISCO_L476VG | 1960 | 0 | 76 | | DISCO_L476VG_GlassLCD/LCD_DISCO_L476VG | 34 | 0 | 0 | | [fill] | 553 | 3 | 42 | | [lib]/c.a | 68359 | 2548 | 127 | | [lib]/gcc.a | 7456 | 0 | 0 | | [lib]/m.a | 788 | 0 | 0 | | [lib]/misc | 252 | 16 | 28 | | [lib]/nosys.a | 32 | 0 | 0 | | [lib]/stdc++.a | 173167 | 165 | 5676 | | main.o | 4424 | 4 | 30 | | mbed-os/cmsis | 1033 | 0 | 84 | | mbed-os/components | 156 | 4 | 4 | | mbed-os/drivers | 692 | 4 | 100 | | mbed-os/hal | 2734 | 8 | 247 | | mbed-os/platform | 2021 | 256 | 136 | | mbed-os/rtos | 7678 | 168 | 6289 | | mbed-os/targets | 12882 | 8 | 913 | | models/deep_mlp.o | 138837 | 4 | 1 | | uTensor/uTensor | 6709 | 28 | 7 | | Subtotals | 429767 | 3216 | 13760 | Total Static RAM memory (data + bss): 16976 bytes Total Flash memory (text + data): 432983 bytes Binary MNIST_LCD
  • 27. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "27 NUCLEO-F411RE
 https://os.mbed.com/platforms/ST-Nucleo-F411RE/ DISCO-L476VG
 https://os.mbed.com/platforms/ST-Discovery-L476VG/ DISCO-F413ZH
 https://os.mbed.com/platforms/ST-Discovery-F413H/ Hardware
  • 29. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "29 uTensor is young and under going rapid development. 
 Many exciting features are on the way: • Convolution • Pooling • CMSIS-NN integration (https://arm-software.github.io/CMSIS_5/NN/html/index.html) • Smaller binary • More efficient Run-time uTensor README.MD
  • 31. © 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ "31 • Why • Machine Learning Models • uTensor • C++ code • TensorFlow Lite Micro Summary