---
title: "Course 3: Deploying TinyML"
---

```{=html}
<div style="margin-bottom: 1.5rem;">
  <a href="tinyml.html" class="btn-outline">← Back to TinyML Overview</a>
  <a href="https://github.com/harvard-edge/cs249r_book/releases/download/slides-latest/MLSysBook-TinyML-All.zip" class="btn-accent" target="_blank">Download All (ZIP)</a>
  <a href="https://www.edx.org/professional-certificate/harvardx-tiny-machine-learning" class="btn-outline" target="_blank">edX Course</a>
</div>

<!-- ================================================================ -->
<!-- CHAPTER 4: Deploying TinyML -->
<!-- ================================================================ -->
<div class="module-card">
  <span class="tag">Chapter 4 · Course 3</span>
  <h3>Deploying TinyML</h3>
  <p class="module-desc">End-to-end deployment with TensorFlow Lite for Microcontrollers. Covers embedded hardware/software, TFLite Micro internals, and hands-on labs deploying keyword spotting, visual wake words, and gesture recognition on Arduino.</p>
  <span class="companion">Textbook companion: <a href="https://mlsysbook.ai/vol1/">Vol I Ch 11, 13</a> · <a href="https://mlsysbook.ai/kits/">Arduino &amp; Seeed Kits</a></span>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.1 Welcome to Deploying TinyML</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Welcome to TinyML3</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-1-1.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Welcome Message from VJ</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-1-2.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Course 1 and 2 Recap</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-1-3.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>TinyML Application Deployment Preview</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-1-6.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>The TinyML Kit</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-1-7.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>TinyML Course Kit Overview</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-1-8.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>How the Course is Structured</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-1-11.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.2 Getting Started</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>C++ for Python Users</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-2-2.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Setting up your Hardware</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-2-3.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Setting up your Software</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-2-5.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>The Arduino Blink Example</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-2-8.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Testing the TensorFlow Install</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-2-10.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Testing the Sensors</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-2-13.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.3 Embedded Hardware and Software</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Embedded System</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-3-1.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Diversity of Embedded Systems</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-3-2.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Embedded Computing Hardware</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-3-3.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Diversity of Embedded Microcontrollers</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-3-4.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Embedded I/O</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-3-5.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Transducer Modules and Wireless Communication</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-3-6.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Embedded System Software</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-3-8.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Arduino cores, frameworks, mbedOS, and 'bare metal'</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-3-9.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Embedded ML Software</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-3-10.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.4 TensorFlow Lite Micro</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>What is TensorFlow Lite for Microcontrollers?</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-4-1.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>TFMicro: The Big Picture</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-4-2.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>TFLite Micro: Interpreter</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-4-5.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>MCU Memory Hierarchy</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-4-6.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>TFLite Micro: Model Format / FlatBuffer</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-4-7.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td><a href="https://colab.research.google.com/github/tinyMLx/colabs/blob/master/4-4-8-Flatbuffers.ipynb" target="_blank">TensorFlow Lite Flatbuffer Manipulation Colab</a></td>
        <td class="dl-col"><span class="badge-colab">Colab</span></td>
      </tr>
      <tr>
        <td>TFLite Micro: Memory Allocation (Tensor Arena)</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-4-10.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>TFLite Micro: NN Operator Support (OpsResolver)</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-4-11.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>TFLite Micro Developer Design Principles</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-4-12.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.5 Keyword Spotting</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>TinyML "Keyword Spotting" Workflow</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-5-1.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>KWS Application Architecture</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-5-2.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>KWS Initialization</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-5-3.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>KWS Pre-processing</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-5-6.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>KWS Inference</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-5-9.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>KWS Post-processing</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-5-12.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>KWS Summary</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-5-14.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.6 Custom Dataset Engineering for Keyword Spotting</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Recap Dataset Engineering</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-6-1.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Introducing Custom Dataset for KWS</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-6-2.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Things to Consider for Your Data Collection Plan</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-6-3.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Building a Custom Dataset</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-6-6.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Train and Deploy Your Custom Dataset KWS Model</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-6-8.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.7 Visual Wake Words</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Recap: What are Visual Wake Words?</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-7-1.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Person Detection Application Architecture</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-7-2.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Person Detection with KWS: MultiModal</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-7-5.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Person Detection with KWS: MultiTenancy</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-7-6.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>MultiTenancy in TensorFlow Lite Micro</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-7-8.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Deploying the Pretrained Person Detection Model</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-7-9.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Deploying a Multi-Tenant Application</td>
        <td class="dl-col">—</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.8 Gesture Recognition — Magic Wand</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Recap: Time Series for Anomaly Detection</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-8-1.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>TinyML Sensor Ecosystem</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-8-2.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Anatomy of an IMU</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-8-3.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Magic Wand Application</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-8-4.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Magic Wand Application Architecture</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-8-5.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Understanding the Magic Wand Application</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-8-6.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Deploying the Magic Wand</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-8-8.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Collecting Data for Your Custom Magic Wand Project</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-8-10.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Training and Deploying Your Custom Magic Wand Project</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-8-12.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.9 Responsible AI Deployment</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Privacy</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-9-1.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>Privacy</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/other/4-9-3.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Security</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-9-4.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td><a href="https://colab.research.google.com/github/tinyMLx/colabs/blob/master/4-9-6-Attacking-KWSModel.ipynb" target="_blank">Attacking a KWS Model in Colab</a></td>
        <td class="dl-col"><span class="badge-colab">Colab</span></td>
      </tr>
      <tr>
        <td>Why do ML Models Fail after Deployment?</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-9-8.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>Monitoring after Deployment</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-9-9.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div class="module-card">
  <h4 class="section-header-sm">§4.10 Summary</h4>
  <table class="section-list">
    <thead>
      <tr><th>Topic</th><th class="dl-col">Type</th></tr>
    </thead>
    <tbody>
      <tr>
        <td>Congratulations! You Made it to the Finish Line!</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-10-1.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>What Comes Next: Advanced Topics in TinyML</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-10-2.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
      <tr>
        <td>What Do I Do Now?</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/slides/4-10-3.pdf" target="_blank" class="badge-slides">Slides</a></td>
      </tr>
      <tr>
        <td>TinyMLx Project Extension (Optional)</td>
        <td class="dl-col"><a href="https://github.com/tinyMLx/courseware/raw/master/edX/readings/4-10-4.pdf" target="_blank" class="badge-reading">Reading</a></td>
      </tr>
    </tbody>
  </table>
</div>
```

::: {.callout-note}
These materials were originally developed for the [HarvardX Professional Certificate in Tiny Machine Learning](https://www.edx.org/professional-certificate/harvardx-tiny-machine-learning) on edX. See the [original curriculum](tinyml/README-edx-original.md) for the full item-by-item breakdown including forum prompts and quizzes not listed above.
:::
