In this exciting Professional Certificate program offered by Harvard University and Google TensorFlow, you will learn about the emerging field of Tiny Machine Learning (TinyML), its real-world applications, and the future possibilities of this transformative technology.
TinyML is a cutting-edge field that brings the transformative power of machine learning (ML) to the performance-constrained and power-constrained domain of embedded systems. Successful deployment in this field requires intimate knowledge of applications, algorithms, hardware, and software.
The program will emphasize hands-on experience with training and deploying machine learning onto tiny embedded devices. This series of courses features projects based on a TinyML Program Kit that includes an Arduino board with onboard sensors and an ARM Cortex-M4 microcontroller. To ensure you hit the road running, the kit also comes equipped with a camera. The TinyML Program Kit has everything you need to unlock your imagination and build applications around image recognition, audio processing, and gesture detection. Before you know it, you’ll be implementing an entire tiny machine learning application.
This first-of-its-kind program combines computer science with engineering to feature real-world application case studies that examine the challenges facing TinyML deployments.
This program is a collaboration between expert faculty at Harvard’s John A. Paulson School of Engineering and Applied Sciences (SEAS) and innovative members of Google’s TensorFlow team.
TinyML on edX is designed in four chapters across 3 courses as described below. [Specialization Link]
- Course 1: Fundamentals of TinyML (Chapter 1 & Chapter 2): Focusing on the basics of machine learning and embedded systems, such as smartphones, this course will introduce you to the “language” of TinyML.
- Course 2: Applications of TinyML (Chapter 3): Get the opportunity to see TinyML in practice. You will see examples of TinyML applications, and learn first-hand how to train these models for tiny applications such as keyword spotting, visual wake words, and gesture recognition.
- Course 3: Deploying TinyML (Chapter 4): Learn to program in TensorFlow Lite for microcontrollers so that you can write the code, and deploy your model to your very own tiny microcontroller. Before you know it, you’ll be implementing an entire TinyML application.
The goal of this chapter is to introduce the students to the core concepts, challenges, and opportunites of TinyML. It will also give an overview of the entire specialization; how the courses are structured and what to expect as a student steping through the curriculum.
- What is this specialization all about? [Slides]
- Who is this course aimed at (everyone)? [Slides]
- Forum: Introduce yourself to the class
- What will you learn? [Slides]
- How is the course structured? [Slides]
- Student background quiz
- What is (tiny) Machine Learning? [Slides]
- TinyML application case studies. [Doc]
- Forum: What TinyML applications are you excited about?
- How do we enable TinyML? [Slides]
- Formative quiz.
- What are the Challenges for TinyML (Part A)? [Slides]
- What are the Challenges for TinyML (Part B)? [Slides]
- Formative quiz.
- What are the Challenges for TinyML (Part C)? [Slides]
- What are the challenges for TinyML (Part D)? [Slides]
- Why the Future of ML is Tiny. [Doc]
- Introduction to Responsible AI/ML. [Slides]
- Forum: Case Studies of Responsible AI/ML Failures. [Doc]
- Formative Quiz
- Summative Test
- What resources are needed for this courese? [Slides]
- Introduction to Google Colab [Video Link
- Colab in this Course [Slides]
- Learning Colab [Colab link]
- Tips for using Colab [Doc]
- Introduction to TensorFlow [Video Link]
- TensorFlow in this course
- Sample TensorFlow code. [Doc]
- Summative Test
The goal of this section of the course is to introduce students to “ML language” that we will be using throughout the TinyML course. More specifically, this course focuses on the basics of machine learning and embedded systems. Some of you might have a deep machine learning background. In this case, parts of this section will be more of a review for you. We encourage you to still go through things, take the tests, and get excited for the next course which will dive deeper into TinyML, covering frameworks and applications that you may be less familiar with.
- The machine learning paradigm [Slides]
- Finding Patterns
- Thinking about Loss [Slides]
- Exploring Loss [Colab Link]
- Minimizing Loss [Slides]
- Exploring Gradient Descent [Colab Link]
- Formative Quiz
- First Neural Network [Slides]
- First Neural Network in Colab [Colab Link]
- More on Neural Networks [Doc]
- Machine Learning Case Studies [Doc]
- Formative Quiz
- Neural Network Coding Assignment [Colab Link]
- Assignment Solution [Doc]
- Summative Test
- Initialization in Machine Learning [Doc]
- Understanding Neurons [Slides]
- Coding ExerciseL Neurons in Action [Colab Link]
- Coding Stepback [Doc]
- Coding Exercise: Multi-Layer Neural Network [Colab Link]
- Introduction to Classification [Slides]
- Coding Exercise: DNN [Colab Link]
- Formative Quiz
- Training, Validation, and Test Data [Slides]
- Formative Quiz
- Realities of Coding Neural Networks [Doc]
- Coding Assignment: DNNs [Colab Link]](https://colab.research.google.com/github/tinyMLx/colabs/blob/master/2-2-12-AssignmentQuestion.ipynb)
- Assignment Solution [Doc]
- Summative Test
- Quick Recap [Doc]
- Introducing Convolutions [Slides]
- Coding Exercise: Filters [Colab Link]
- From DNN to CNN [Slides]
- Coding exercise: CNN [Colab Link]
- Mapping Features to Labels [Doc]
- Coding Exercise: Computer Vision [Colab Link]
- Formative Quiz
- Coding Assignment: CNNs [Colab Link]
- Assignment Solution [Doc]
- Summative Test
- Quick Recap [Doc]
- Preparing Image Data [Slides]
- Coding Exercise: Complex Images [Colab Link]
- TFDS for Image Data [Doc]
- Overfitting [Slides]
- Coding exercise: Image Augmentation [Colab Link]
- Formative Quiz
- Dropout Regularization [Doc]
- Exploring Loss Functions and Optimizers [Doc]
- Formative Quiz
- Coding Assignment: Enhancing a CNN [Colab Link]
- Assignment Solution [Doc]
- Summative Test
- What Am I Building? What’s the Goal? [Slides]
- Forum: Development and TinyML [Doc]
- Who Am I Building This For? [Slides]
- What Are the Consequences for the User When It Fails? [Slides]
- Formative Quiz
- Forum: Error Types and Ethics [Doc]
- Summative Test
- Recapping (Tiny) ML and its Data-Centric Role [Doc]
- Why We Are Excited About TinyML [Slides]
- What We Have Learned Thus Far [Slides]
- Formative Summary Quiz
- What's Coming Next [Slides]
- Give us Feedback!
The goal of this chapter is to focus on applications, data and neural networks on tiny or deeply embedded devices. We will expose the students to embedded devices and different real-world application scenarios of TinyML. We do this by covering the most widely used applications for TinyML, coupled with some hands-on Colab development.
- Who's Who in TinyML2?! [Doc]
- Forum: Welcome New Students
- Welcome to TinyML Applications [Slides]
- Building Blocks (from Course 1) [Slides]
- Formative Quiz
- What You’ll Learn in This Course [Slides]
- What Resources are Needed for this Course [Doc]
- Preview of TinyML Applications [Slides]
- The Role of Sensors in TinyML Applications [Doc]
- Student Background Quiz
- Forum: What Applications Excite You?
- The Kit for Course 3 [Doc]
- ML Lifecycle Part 1 [Slides]
- Forum: The Future of TinyML
- ML Lifecycle Part 2 [Doc]
- ML Workflow Part 1 [Slides]
- ML Workflow Part 2 [Doc]
- Formative Quiz
- Summative Test
- TensorFlow: Where We Left Off [Doc]
- Introduction to TensorFlow Lite [Slides]
- Using the TFLite Converter Screencast
- Using the TFLite Converter in Colab [Colab Link]
- How to use TFLite Models [Doc]
- How to use TFLite Models Screencast
- Running Models with TFLite in Colab [Colab Link]
- Formative Quiz
- TFLite Optimizations and Quantization [Slides]
- TFLite Optimizations and Quantization in Colab [Colab Link]
- Quantization Aware Training [Slides]
- Quantization Aware Training Colab [Colab Link]
- Formative Quiz
- Assignment: Quantization in TFLite [Colab Link]
- Assignment Solution [Doc]
- Summative Test
- Why are 8-Bits Enough for ML? [Doc]
- Post Training Quantization (PTQ) [Slides]
- PTQ Weight Distribution Colab [Colab Link]
- Quantization Aware Training (QAT) [Slides]
- Formative Quiz
- Inference Engine: TF vs. TFLite [Slides]
- Conversion and Deployment [Doc]
- Formative Quiz
- Summative Test
- Introduction to Keyword Spotting (KWS) [Slides]
- Forum: How (else) would you use KWS?
- Keyword Spotting Challenges/Constraints [Slides]
- Formative Quiz
- Keyword Spotting Application Architecture Overview [Doc]
- Keyword Spotting Datasets [Slides]
- Keyword Spotting Dataset Creation [Doc]
- Keyword Spotting Data Collection / Pre-Processing [Slides]
- Spectrograms and MFCCs [Doc]
- Spectrograms and MFCCs in Colab [Colab Link]
- A Keyword Spotting Model [Slides]
- Formative Quiz
- Keyword Spotting in Colab [Colab Link]
- Forum: Pretrained Model Experience
- Intro to Training in Colab [Slides]
- Training in Colab [Doc]
- Monitoring Training in Colab [Doc]
- Assignment: Training your own Keyword Spotting Model [Colab Link]
- Assignment Solution [Doc]
- KWS Metrics [Slides]
- Formative Quiz
- Streaming Audio [Slides]
- Cascade Architectures [Slides]
- Keyword Spotting in the Big Picture [Doc]
- Formative Quiz
- Summative Test
- Introduction to Data Engineering [Doc]
- What’s Data Engineering and Why It’s Important [Slides]
- Forum: What Dataset might you want to collect?
- Dataset Standards: Speech Commands [Slides]
- Speech Commands Paper [Doc]
- Formative Quiz
- Crowdsourcing Data for the Long Tail [Slides]
- Giving back to the Open Source Community [Doc]
- Reusing and Adapting Existing Datasets [Slides]
- Formative Quiz
- Responsible Data Collection [Slides]
- Forum: What do you think about open source data collection?
- Section Summary [Doc]
- Summative Test
- Introduction to Visual Wake Words (VWW) Application [Doc]
- What are Visual Wake Words (VWW)? [Slides]
- Forum: What do you think might be the challenges for Visual Wake Words?
- Visual Wake Words Challenges [Slides]
- Visual Wake Words Dataset [Slides]
- Data Privacy with Images [Doc]
- Formative Quiz
- Neural Network Architectures for VWW [Slides]
- The Math Behind MobileNets Efficient Computation [Doc]
- Transfer Learning for VWW [Slides]
- Assignment: Transfer Learning in Colab [Colab Link]
- Assignment Solution [Doc]
- Common Myths and Pitfalls about Transfer Learning [Doc]
- Formative Quiz
- Metrics for VWW [Slides]
- Section Summary [Doc]
- Summative Test
- Introduction to Anomaly Detection [Doc]
- What Is Anomaly Detection [Slides]
- Forum: Interesting applications of anomaly detection
- Anomaly Detection in Industry [Slides]
- Industry 4.0 and TinyML [Doc]
- Anomaly Detection Datasets [Slides]
- MIMII Dataset [Doc]
- Real vs. Synthetic Data [Doc]
- Unsupervised Learning for Anomaly Detection (with K-Means in Colab) [Colab Link]
- Formative Quiz
- Unsupervised Learning for Anomaly Detection with Autoencoders [Slides]
- Autoencoder Model Architecture [Doc]
- Training and Metrics for Autoencoders in Colab [Colab Link]
- Forum: Picking a Threshold
- Formative Quiz
- Assignment: Training an Anomaly Detection Model [Colab Link]
- Assignment Solution [Doc]
- Section Summary [Doc]
- Summative Test
- Data Collection [Slides]
- The Many Faces of Bias in ML [Doc]
- Biased Datasets [Slides]
- Formative Quiz
- Forum: Bias [Doc]
- Fairness [Slides]
- Google's What-If Tool in Colab [Colab Link]
- Forum: Fairness [Doc]
- Summative Test
The goal of this chapter is to teach learners how to engineer end-to-end tinyML applications using TensorFlow Micro. We teach learners how to program in TF Micro, and use it to deploy real-world applications.
- Welcome to TinyML3 [Doc]
- Welcome Message from VJ [Slides]
- Course 1 and 2 Recap [Doc]
- Quiz: Embedded Systems & ML Background
- Quiz Feedback
- TinyML Application Deployment Preview [Slides]
- The TinyML Kit [Doc]
- TinyML Course Kit Overview [Slides]
- Forum: Welcome (Back) Students
- Student Background Quiz
- How the Course is Structured [Slides]
- Intro to the Lab Sections Screencast
- C++ for Python Users [Doc]
- Setting up your Hardware [Doc]
- Forum: Hardware Setup Questions
- Setting up your Software [Doc]
- Forum: Software Setup Questions
- Formative Quiz
- The Arduino Blink Example [Doc]
- Forum: Arduino Blink Questions
- Testing the TensorFlow Install [Doc]
- Forum: TensorFlow Install Questions
- Formative Quiz
- Testing the Sensors [Doc]
- Forum: Sensor Tests Questions
- Formative Quiz
- Summative Test
- Embedded System [Slides]
- Diversity of Embedded Systems [Doc]
- Embedded Computing Hardware [Slides]
- Diversity of Embedded Microcontrollers [Doc]
- Embedded I/O [Slides]
- Transducer Modules and Wireless Communication [Doc]
- Formative Quiz
- Embedded System Software [Slides]
- Arduino cores, frameworks, mbedOS, and ‘bare metal’ [Doc]
- Embedded ML Software [Slides]
- Formative Quiz
- Summative Test
- What is TensorFlow Lite for Microcontrollers? [Doc]
- TFMicro: The Big Picture [Slides]
- Formative Quiz
- How to Use TFMicro: HelloWorld Screencast
- TFLite Micro: Interpreter [Slides]
- MCU Memory Hierarchy [Doc]
- TFLite Micro: Model Format / FlatBuffer [Slides]
- TensorFlow Lite Flatbuffer Manipulation Colab [Colab Link]
- Formative Quiz
- TFLite Micro: Memory Allocation (a.k.a Tensor Arena) [Slides]
- TFLite Micro: NN Operator Support (OpsResolver) [Slides]
- TFLite Micro Developer Design Principles [Doc]
- Formative Quiz
- Summative Test
- TinyML “Keyword Spotting” Workflow [Doc]
- KWS Application Architecture [Slides]
- KWS Initialization [Slides]
- KWS Initialization Screencast
- Formative Quiz
- KWS Pre-processing [Slides]
- KWS Pre-processing Screencast
- Formative Quiz
- KWS Inference [Slides]
- KWS Inference Screencast
- Formative Quiz
- KWS Post-processing [Slides]
- KWS Post-processing Screencast
- KWS Summary [Slides]
- Formative Quiz
- Deploying the Pretrained KWS Model
- Forum: Deploying the Pretrained KWS Model Questions
- Deploying a KWS Model with Your Favorite Keyword(s)
- Forum: Deploying a KWS Model with Your Favorite Keyword(s) Questions
- Formative Quiz
- Summative Test
- Recap Dataset Engineering [Doc]
- Introducing Custom Dataset for KWS [Slides]
- Things to Consider for Your Data Collection Plan [Doc]
- Formative Quiz
- Forum Your Data Collection Plan
- Building a Custom Dataset [Doc]
- Forum: Building a Custom Dataset Questions
- Train and Deploy Your Custom Dataset KWS Model [Doc]
- Forum: Train and Deploy Your Custom Dataset KWS Model Questions
- Forum: How Well Does Your Custom Dataset Model Work?
- Summative Test
- Recap: What are Visual Wake Words? [Doc]
- Person Detection Application Architecture [Slides]
- Person Detection Screencast
- Formative Quiz
- Person Detection with Keyword Spotting: MultiModal [Slides]
- Person Detection with Keyword Spotting: MultiTenancy [Slides]
- Formative Quiz
- MultiTenancy in TensorFlow Lite Micro [Slides]
- Deploying the Pretrained Person Detection Model [Doc]
- Forum: Deploying the Pretrained Person Detection Model Questions
- Deploying a Multi-Tenant Application [Doc]
- Forum: Deploying a Multi-Tenant Application
- Formative Quiz
- Summative Test
- Recap: Time Series for Anomaly Detection [Doc]
- TinyML Sensor Ecosystem [Slides]
- Anatomy of an IMU [Doc]
- Magic Wand Application [Slides]
- Magic Wand Application Architecture [Slides]
- Understanding the Magic Wand Application [Doc]
- Formative Quiz
- Deploying the Magic Wand [Doc]
- Forum: Deploying the Magic Wand Questions
- Collecting Data for Your Custom Magic Wand Project [Doc]
- Forum: Collecting Data for Your Custom Magic Wand Project Questions
- Training and Deploying Your Custom Magic Wand Project [Doc]
- Forum: Training and Deploying Your Custom Magic Wand Project Questions
- Forum: How well does your Custom Magic Wand Model Work?
- Summative Quiz
- Formative Test
- Privacy [Slides]
- Formative Quiz
- Forum: Privacy [Doc]
- Security [Slides]
- Formative Quiz
- Attacking a KWS Model in Colab [Colab Link]
- Forum: Attacking a KWS Model in Colab Questions
- Why do ML Models Fail after Deployment? [Doc]
- Monitoring after Deployment [Slides]
- Summative Test
- Congratulations! You Made it to the Finish Line! [Slides]
- What Comes Next: Advanced Topics in TinyML [Doc]
- What Do I Do Now? [Slides]
- TinyMLx Project Extension (Optional) [Doc]
- Outgoing Survey of the Course and Topics
This course introduces learners to Machine Learning Operations (MLOps) through the lens of TinyML (Tiny Machine Learning). Learners explore best practices to deploy, monitor, and maintain (tiny) Machine Learning models in production at scale.
- What to Expect in This Course [Doc]
- Welcome Message [Slides]
- Who Should Take This Course? [Doc]
- The Past, Present and Future of ML [Slides]
- Why the Future of ML is Tiny and Bright [Doc]
- Machine Learning Lifecycle [Slides]
- Review of Course 1, 2 & 3 [Doc]
- Formative Quiz
- Scaling TinyML [Slides]
- Introduction to MLOps [Slides]
- Overview of MLOps [Doc]
- Course Structure [Slides]
- Course Activities [Doc]
- Your Mindset: T-Shaped Skills Needed for ML Engineers [Slides]
- Summary of What You’ll Learn [Doc]
- Formative Quiz
- Forum: Introduce Yourself
- Student background quiz
- Who’s Who in MLOps for TinyML? [Doc]
- Overview of MLOps Objectives [Doc]
- What is MLOps, DevOps, and AI Ops [Slides]
- Formative Quiz
- MLOps: A Use Case Overview [Slides]
- MLOps Persona [Doc]
- MLOps: Key activities and Lifecycle [Slides]
- Forum: How can you apply MLOps thinking to your future projects?
- Formative Quiz
- Summative Test
- Overview of ML Development [Doc]
- ML Development [Slides]
- Problem Definition [Slides]
- Forum: How Might You Define KWS [Doc]
- Data Selection for KWS [Slides]
- Why Real Data Matters [Doc]
- Data Exploration [Slides]
- Data Visualization Tools [Doc]
- Formative Quiz
- Feature Engineering [Slides]
- Feature Engineering for KWS: A Case Study [Doc]
- Model Prototyping [Slides]
- Model Prototyping: Research vs. Production [Doc]
- Formative Quiz
- Model Validation [Slides]
- Model Evaluation [Slides]
- Formative Quiz
- Data Engineering [Slides]
- ML Development Impact on MLOps [Slides]
- Summative Test
- Overview of Training Operationalization [Doc]
- Training Operationalization [Slides]
- CI/CD Triggers [Slides]
- Formative Quiz
- Forum: Software Artifacts [Doc]
- Continuous Integration [Slides]
- CI Tools [Doc]
- Continuous Delivery [Slides]
- Formative Quiz
- Production Deployment [Slides]
- Online Experimentation [Slides]
- Production Deployment in ML Deployment [Doc]
- Forum: Case Study Discussion [Doc]
- Training Operationalization Impact on MLOps [Slides]
- Formative Quiz
- Summative Test
- Overview of Continuous Training [Doc]
- Continuous Training [Slides]
- Retraining Triggers [Slides]
- Formative Quiz
- Data Processing Overview [Slides]
- Data Engineering for Everyone [Doc]
- Formative Quiz
- Data Ingestion [Slides]
- Data Validation [Slides]
- Data Transformation [Slides]
- Formative Quiz
- Training vs. Tuning [Doc]
- Training with AutoML [Slides]
- Neural Architecture Search (NAS) - Part 1 [Slides]
- Formative Quiz
- Neural Architecture Search (NAS) - Part 2 [Slides]
- The Carbon Price of AutoML: CO2 [Doc]
- Continuous Training with Transfer Learning [Slides]
- Pros and Cons of Transfer Learning [Doc]
- Formative Quiz
- Continuous Training Metrics [Slides]
- Forum: Metrics for Continuous Training [Doc]
- Continuous Training Impact on MLOps [Slides]
- Optional: Multilingual Spoken Words Colab [Colab link]
- Summative Test
- Overview of Model Conversion [Doc]
- Model Conversion [Slides]
- ML Frameworks & The Lay of the Land [Slides]
- TF vs. TFLite vs. TFLite Micro [Slides]
- TFLite Micro for TinyML [Doc]
- Formative Quiz
- Model Pruning [Slides]
- Model Clustering [Slides]
- Formative Quiz
- Model Quantization [Slides]
- Collaborative Optimizations [Doc]
- Student Teacher Networks / Knowledge Distillation [Slides]
- Model Conversion Impact on MLOps [Slides]
- Forum: Model Conversion Case Study - Smart DoorBell [Doc]
- Formative Quiz
- Summative Test
- Overview of Model Deployment [Doc]
- Model Deployment [Slides]
- Scaling ML into Production Deployment [Slides]
- Formative Quiz
- Containers for Scaling ML Deployment [Slides]
- Dockers vs. VMs [Doc]
- Formative Quiz
- Challenges for Scaling TinyML Deployment (Part 1) [Slides]
- Challenges for Scaling TinyML Deployment (Part 2) [Slides]
- Forum: Challenges of Scaling TinyML Deployment [Doc]
- Anything As A Service [Doc]
- TinyMLaaS (Part 1): An Introduction [Slides]
- TinyMLaaS (Part 2): Design Overview [Slides]
- Summary of TinyMLaaS [Doc]
- Formative Quiz
- Model Deployment Impact on MLOps [Slides]
- Forum: Driving Mode Detection Case Study [Doc]
- Summative Test
- Overview of Prediction Serving [Doc]
- Prediction Serving [Slides]
- Prediction Serving Scenarios [Doc]
- Prediction Serving Scenarios: Batch [Slides]
- Prediction Serving Scenarios: Online [Slides]
- Formative Quiz
- Prediction Serving Scenarios: Streaming [Slides]
- Prediction Serving Scenarios: Embedded [Slides]
- Formative Quiz
- Prediction Serving Architectures [Slides]
- Formative Quiz
- Embedded Inference Serving Benchmarks [Slides]
- Embedded Benchmarks: An Overview [Doc]
- MLPerf Tiny [Doc]
- Formative Quiz
- Prediction Serving Impact on MLOps [Slides]
- Summative Test
- Overview of Continuous Monitoring [Doc]
- Continuous Monitoring [Slides]
- Model Drift: The Big Picture [Slides]
- Concept Drift [Slides]
- Data Drift [Slides]
- Formative Quiz
- Forum: Have you seen data or concept drift in the real world?
- Dealing With Drift [Slides]
- Continuous Evaluation Challenges for TinyML [Slides]
- TinyML Communication Challenges & Technologies for Continuous Monitoring [Doc]
- Formative Quiz
- On-device Training: Limitations and Opportunities [Doc]
- Continuous Monitoring with Federated ML [Slides]
- Federated Learning Gboard [Doc]
- Formative Quiz
- Continuous Monitoring Impact on MLOps [Slides]
- Forum: The Privacy vs Performance Trade Off [Doc]
- Optional: Federated Learning Colab [Colab link]
- Summative Test