SlideShare a Scribd company logo
1 of 32
Download to read offline
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
© 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
© 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.

More Related Content

Similar to uTensor - embedded devices and machine learning models

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 contractSyaiful 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 toolsBjoern 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 materialkaleeswaranme
 
Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018Karthik 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-jakartaKhairul 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 ToolsJorge 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 Alien4CloudCloudify 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 2018DevOpsGroup
 
Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry PiEueung 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 2023Hal 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 meChris Dufour
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIsCisco 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
 

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
 
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
 
Ml ops on AWS
Ml ops on AWSMl ops on AWS
Ml ops on AWS
 
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...
 
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
 
Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018Michelangelo - Machine Learning Platform - 2018
Michelangelo - Machine Learning Platform - 2018
 
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...
 
02 ansible automateskeynote-jakarta
02 ansible automateskeynote-jakarta02 ansible automateskeynote-jakarta
02 ansible automateskeynote-jakarta
 
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
 
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
 
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
 
Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry Pi
 
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...
 
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
 
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...
 
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...
 
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
 
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
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIs
 
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
 

More from Lars Gregori

BYOM - Bring Your Own Model
BYOM - Bring Your Own ModelBYOM - Bring Your Own Model
BYOM - Bring Your Own ModelLars Gregori
 
SAP Leonardo Machine Learning
SAP Leonardo Machine LearningSAP Leonardo Machine Learning
SAP Leonardo Machine LearningLars Gregori
 
Minecraft and reinforcement learning
Minecraft and reinforcement learningMinecraft and reinforcement learning
Minecraft and reinforcement learningLars Gregori
 
Machine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesMachine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesLars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement LearningLars Gregori
 
IoT protocolls - smart washing machine
IoT protocolls - smart washing machineIoT protocolls - smart washing machine
IoT protocolls - smart washing machineLars Gregori
 
[DE] AI und Minecraft
[DE] AI und Minecraft[DE] AI und Minecraft
[DE] AI und MinecraftLars Gregori
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement LearningLars Gregori
 
[DE] IoT Protokolle
[DE] IoT Protokolle[DE] IoT Protokolle
[DE] IoT ProtokolleLars 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 deviceLars 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 deviceLars 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-PrototypingLars 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-REDLars 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 devicesLars Gregori
 
Embedded Rust on IoT devices
Embedded Rust on IoT devicesEmbedded Rust on IoT devices
Embedded Rust on IoT devicesLars Gregori
 
IoT mit Rust programmieren
IoT mit Rust programmierenIoT mit Rust programmieren
IoT mit Rust programmierenLars Gregori
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-PrototypingLars 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
 

More from Lars Gregori (20)

BYOM - Bring Your Own Model
BYOM - Bring Your Own ModelBYOM - Bring Your Own Model
BYOM - Bring Your Own Model
 
SAP Leonardo Machine Learning
SAP Leonardo Machine LearningSAP Leonardo Machine Learning
SAP Leonardo Machine Learning
 
Minecraft and reinforcement learning
Minecraft and reinforcement learningMinecraft and reinforcement learning
Minecraft and reinforcement learning
 
Machine Learning Models on Mobile Devices
Machine Learning Models on Mobile DevicesMachine Learning Models on Mobile Devices
Machine Learning Models on Mobile Devices
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
 
IoT protocolls - smart washing machine
IoT protocolls - smart washing machineIoT protocolls - smart washing machine
IoT protocolls - smart washing machine
 
[DE] AI und Minecraft
[DE] AI und Minecraft[DE] AI und Minecraft
[DE] AI und Minecraft
 
Minecraft and Reinforcement Learning
Minecraft and Reinforcement LearningMinecraft and Reinforcement Learning
Minecraft and Reinforcement Learning
 
[DE] IoT Protokolle
[DE] IoT Protokolle[DE] IoT Protokolle
[DE] IoT Protokolle
 
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
 
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
 
AI and Minecraft
AI and MinecraftAI and Minecraft
AI and Minecraft
 
[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
 
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
 
Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?   Web Bluetooth - Next Generation Bluetooth?
Web Bluetooth - Next Generation Bluetooth?
 
Embedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devicesEmbedded Rust – Rust on IoT devices
Embedded Rust – Rust on IoT devices
 
Embedded Rust on IoT devices
Embedded Rust on IoT devicesEmbedded Rust on IoT devices
Embedded Rust on IoT devices
 
IoT mit Rust programmieren
IoT mit Rust programmierenIoT mit Rust programmieren
IoT mit Rust programmieren
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-Prototyping
 
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?
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

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
  • 5.
  • 6.
  • 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
  • 26.
  • 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