SlideShare une entreprise Scribd logo
1  sur  13
Implementing Machine Learning
At
The IOT Edge
Steve Mylroie
Roietronics
Machine Learning
Supervised
Linear Regression
Decision Tree
Unsupervised
Deep Neural Networks
Liner Neural Neural Networks
Convolution Neural Networks
Recurrent Neural Networks
SRRN - Simple Recurrent Neural Networks
LSTM – Long Short Term Memory
GRU - Gated Recurrent Unit
GRU NEURAL NETWORK CELL
Sigmoid Function
• A sigmoid function is a
mathematical function
having a characteristic "S"-
shaped curve or sigmoid
curve. Often, sigmoid
function refers to the special
case of the logistic function
shown in the first figure and
defined by the formula
S(x)=1/(1+e⁻ˣ)=eˣ/(eˣ+1).
Training
•Datasets
•Tools
• Azure Notebooks
• Jupyter Notebooks
• Python 3.6
• Kares
• TensorFlow
•Demo
Data Randomization
No Offsets Random 15 Minute Offset per
24 Hour Cycle
Implementation
• Tools
• MBED OS5
• CMSIS-NN Package - GRU Example
• HDF5 Extractor
• Float to Q format Converter
• VS Code
• GNU Tools ARM Embedded
• Issues
• GRU Example Problems
• Weight and Bias Value Transfer
• Q format
• Code
Numeric Formats
Name bits Value bits Exponent bits Min Value Max Value
Float Half 16 10 5 -1*2**15 1*2**15
Float 32 23 8 -1*2**127 1*2**127
Double 64 52 11 -1*2**1023 1*2**1023
Q0.15 (Q15) 16 15 0 -1+2**-15 1-2**-15
Q0.7 (Q7) 8 7 0 -1+-2**-7 1-2**-7
Bit 15 14 13 12
… 0
Value Sign 1/2 1/4 1/8 … 1/(2^15)
Q15 Format
Matrix ordering with Optimization
• Weights are in q7_t and Activations are in q15_t
• Limitation: x4 version requires weight reordering to work
• Here we use only one pointer to read 4 rows in the weight matrix. So if the original q7_t matrix
looks like this:
• | a11 | a12 | a13 | a14 | a15 | a16 | a17 |
• | a21 | a22 | a23 | a24 | a25 | a26 | a27 |
• | a31 | a32 | a33 | a34 | a35 | a36 | a37 |
• | a41 | a42 | a43 | a44 | a45 | a46 | a47 |
• | a51 | a52 | a53 | a54 | a55 | a56 | a57 |
• | a61 | a62 | a63 | a64 | a65 | a66 | a67 |
• We operates on multiple-of-4 rows, so the first four rows becomes
• | a11 | a21 | a12 | a22 | a31 | a41 | a32 | a42 |
• | a13 | a23 | a14 | a24 | a33 | a43 | a34 | a44 |
• | a15 | a25 | a16 | a26 | a35 | a45 | a36 | a46 |
Matrix Reordering with Optimzation (Cont)
• The column left over will be in-order. which is: | a17 | a27 | a37 | a47 |
• For the left-over rows, we do 1x1 computation, so the data remains as its
original order.
• So the stored weight matrix looks like this:
• | a11 | a21 | a12 | a22 | a31 | a41 |
• | a32 | a42 | a13 | a23 | a14 | a24 |
• | a33 | a43 | a34 | a44 | a15 | a25 |
• | a16 | a26 | a35 | a45 | a36 | a46 |
• | a17 | a27 | a37 | a47 | a51 | a52 |
• | a53 | a54 | a55 | a56 | a57 | a61 |
• | a62 | a63 | a64 | a65 | a66 | a67 |
CMSIS-NN Software Library
• https://arm-
software.github.io/CMSIS_5/NN/html/group__GRUExample.html
• https://arm-
software.github.io/CMSIS_5/DSP/html/group__float__to__x.html
• https://github.com/ARM-software/CMSIS_5
• https://os.mbed.com/blog/entry/uTensor-and-Tensor-Flow-
Announcement/ May 2019
References 1
• Under Standing LSTMetwork
http://colah.github.io/posts/2015-08-Understanding-LSTMs/
• cmsis-nn GRU example
https://arm-software.github.io/CMSIS_5/NN/html/group__GRUExample.html
• Azure Notebooks
https://notebooks.azure.com/
• Jupyter Notebooks
https://jupyter.org/
• Keras Documentation
https://keras.io/
• Keras Model Guide
https://keras.io/getting-started/sequential-model-guide/
• Keras Recurrent Layers
https://keras.io/layers/recurrent/
(Scroll down for GRU cell entry)
• TensorFlow
https://www.tensorflow.org/
• Python 3.6 Documentation
https://devdocs.io/python~3.6/
References 2
• Heretical Data File 5 (HDF5)
https://portal.hdfgroup.org/display/support/Documentation
• Floating Point to Q Format Converter
https://www.mathworks.com/matlabcentral/fileexchange/61669-decimal-to-fixed-point-q-format-converter
• Mbed OS
https://os.mbed.com/
• CMSIS NN Package
https://arm-software.github.io/CMSIS_5/NN/html/index.html
• CMSIS Packages Down Load
https://github.com/ARM-software/CMSIS_5
• Conversion to CMSIS-NN
https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-
guides/converting-a-neural-network-for-arm-cortex-m-with-cmsis-nn/single-page
• VSCode
https://code.visualstudio.com/
• Sample Data Sets
https://www.deepsig.io/datasets
• SSD Notebook
https://notebooks.azure.com/smylroie/projects/ssd-demo

Contenu connexe

Dernier

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Dernier (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Implementing machine learnng at the iot edge

  • 1. Implementing Machine Learning At The IOT Edge Steve Mylroie Roietronics
  • 2. Machine Learning Supervised Linear Regression Decision Tree Unsupervised Deep Neural Networks Liner Neural Neural Networks Convolution Neural Networks Recurrent Neural Networks SRRN - Simple Recurrent Neural Networks LSTM – Long Short Term Memory GRU - Gated Recurrent Unit
  • 4. Sigmoid Function • A sigmoid function is a mathematical function having a characteristic "S"- shaped curve or sigmoid curve. Often, sigmoid function refers to the special case of the logistic function shown in the first figure and defined by the formula S(x)=1/(1+e⁻ˣ)=eˣ/(eˣ+1).
  • 5. Training •Datasets •Tools • Azure Notebooks • Jupyter Notebooks • Python 3.6 • Kares • TensorFlow •Demo
  • 6. Data Randomization No Offsets Random 15 Minute Offset per 24 Hour Cycle
  • 7. Implementation • Tools • MBED OS5 • CMSIS-NN Package - GRU Example • HDF5 Extractor • Float to Q format Converter • VS Code • GNU Tools ARM Embedded • Issues • GRU Example Problems • Weight and Bias Value Transfer • Q format • Code
  • 8. Numeric Formats Name bits Value bits Exponent bits Min Value Max Value Float Half 16 10 5 -1*2**15 1*2**15 Float 32 23 8 -1*2**127 1*2**127 Double 64 52 11 -1*2**1023 1*2**1023 Q0.15 (Q15) 16 15 0 -1+2**-15 1-2**-15 Q0.7 (Q7) 8 7 0 -1+-2**-7 1-2**-7 Bit 15 14 13 12 … 0 Value Sign 1/2 1/4 1/8 … 1/(2^15) Q15 Format
  • 9. Matrix ordering with Optimization • Weights are in q7_t and Activations are in q15_t • Limitation: x4 version requires weight reordering to work • Here we use only one pointer to read 4 rows in the weight matrix. So if the original q7_t matrix looks like this: • | a11 | a12 | a13 | a14 | a15 | a16 | a17 | • | a21 | a22 | a23 | a24 | a25 | a26 | a27 | • | a31 | a32 | a33 | a34 | a35 | a36 | a37 | • | a41 | a42 | a43 | a44 | a45 | a46 | a47 | • | a51 | a52 | a53 | a54 | a55 | a56 | a57 | • | a61 | a62 | a63 | a64 | a65 | a66 | a67 | • We operates on multiple-of-4 rows, so the first four rows becomes • | a11 | a21 | a12 | a22 | a31 | a41 | a32 | a42 | • | a13 | a23 | a14 | a24 | a33 | a43 | a34 | a44 | • | a15 | a25 | a16 | a26 | a35 | a45 | a36 | a46 |
  • 10. Matrix Reordering with Optimzation (Cont) • The column left over will be in-order. which is: | a17 | a27 | a37 | a47 | • For the left-over rows, we do 1x1 computation, so the data remains as its original order. • So the stored weight matrix looks like this: • | a11 | a21 | a12 | a22 | a31 | a41 | • | a32 | a42 | a13 | a23 | a14 | a24 | • | a33 | a43 | a34 | a44 | a15 | a25 | • | a16 | a26 | a35 | a45 | a36 | a46 | • | a17 | a27 | a37 | a47 | a51 | a52 | • | a53 | a54 | a55 | a56 | a57 | a61 | • | a62 | a63 | a64 | a65 | a66 | a67 |
  • 11. CMSIS-NN Software Library • https://arm- software.github.io/CMSIS_5/NN/html/group__GRUExample.html • https://arm- software.github.io/CMSIS_5/DSP/html/group__float__to__x.html • https://github.com/ARM-software/CMSIS_5 • https://os.mbed.com/blog/entry/uTensor-and-Tensor-Flow- Announcement/ May 2019
  • 12. References 1 • Under Standing LSTMetwork http://colah.github.io/posts/2015-08-Understanding-LSTMs/ • cmsis-nn GRU example https://arm-software.github.io/CMSIS_5/NN/html/group__GRUExample.html • Azure Notebooks https://notebooks.azure.com/ • Jupyter Notebooks https://jupyter.org/ • Keras Documentation https://keras.io/ • Keras Model Guide https://keras.io/getting-started/sequential-model-guide/ • Keras Recurrent Layers https://keras.io/layers/recurrent/ (Scroll down for GRU cell entry) • TensorFlow https://www.tensorflow.org/ • Python 3.6 Documentation https://devdocs.io/python~3.6/
  • 13. References 2 • Heretical Data File 5 (HDF5) https://portal.hdfgroup.org/display/support/Documentation • Floating Point to Q Format Converter https://www.mathworks.com/matlabcentral/fileexchange/61669-decimal-to-fixed-point-q-format-converter • Mbed OS https://os.mbed.com/ • CMSIS NN Package https://arm-software.github.io/CMSIS_5/NN/html/index.html • CMSIS Packages Down Load https://github.com/ARM-software/CMSIS_5 • Conversion to CMSIS-NN https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to- guides/converting-a-neural-network-for-arm-cortex-m-with-cmsis-nn/single-page • VSCode https://code.visualstudio.com/ • Sample Data Sets https://www.deepsig.io/datasets • SSD Notebook https://notebooks.azure.com/smylroie/projects/ssd-demo