Files
TinyTorch/book/_build/html/intro.html
Vijay Janapa Reddi 8afe207ce5 Renumber modules from 00-13 to 01-14 for natural numbering
 Rename all module directories: 00_setup → 01_setup, etc.
 Update convert_modules.py mappings for new directory names
 Update _toc.yml file paths and titles (1-14 instead of 0-13)
 Regenerate all overview pages with new numbering
 Fix all broken references in usage-paths and intro
 Update chapter references to use natural numbering

Benefits:
- More intuitive course progression starting from 1
- Matches academic course numbering conventions
- Eliminates confusion about 'Module 0' concept
- Cleaner mental model for students and instructors
- All references and links properly updated

Complete transformation: 14 modules now numbered 01-14
2025-07-15 18:51:36 -04:00

790 lines
36 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en" data-content_root="" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Tiny🔥Torch: Build Machine Learning Systems from Scratch &#8212; Tiny🔥Torch: Build ML Systems from Scratch</title>
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
</script>
<!-- Loaded before other Sphinx assets -->
<link href="_static/styles/theme.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link href="_static/styles/bootstrap.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link href="_static/styles/pydata-sphinx-theme.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link href="_static/vendor/fontawesome/6.1.2/css/all.min.css?digest=5b4479735964841361fd" rel="stylesheet" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" href="_static/styles/sphinx-book-theme.css?digest=14f4ca6b54d191a8c7657f6c759bf11a5fb86285" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css" />
<link rel="stylesheet" type="text/css" href="_static/design-style.4045f2051d55cab465a707391d5b2007.min.css" />
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=5b4479735964841361fd" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=5b4479735964841361fd" />
<script src="_static/vendor/fontawesome/6.1.2/js/all.min.js?digest=5b4479735964841361fd"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/clipboard.min.js"></script>
<script src="_static/copybutton.js"></script>
<script src="_static/scripts/sphinx-book-theme.js?digest=5a5c038af52cf7bc1a1ec88eea08e6366ee68824"></script>
<script>let toggleHintShow = 'Click to show';</script>
<script>let toggleHintHide = 'Click to hide';</script>
<script>let toggleOpenOnPrint = 'true';</script>
<script src="_static/togglebutton.js"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
<script src="_static/design-tabs.js"></script>
<script>const THEBE_JS_URL = "https://unpkg.com/thebe@0.8.2/lib/index.js"
const thebe_selector = ".thebe,.cell"
const thebe_selector_input = "pre"
const thebe_selector_output = ".output, .cell_output"
</script>
<script async="async" src="_static/sphinx-thebe.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'intro';</script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="🔬 Quick Exploration Path" href="usage-paths/quick-exploration.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
<body data-bs-spy="scroll" data-bs-target=".bd-toc-nav" data-offset="180" data-bs-root-margin="0px 0px -60%" data-default-mode="">
<a class="skip-link" href="#main-content">Skip to main content</a>
<div id="pst-scroll-pixel-helper"></div>
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>
Back to top
</button>
<input type="checkbox"
class="sidebar-toggle"
name="__primary"
id="__primary"/>
<label class="overlay overlay-primary" for="__primary"></label>
<input type="checkbox"
class="sidebar-toggle"
name="__secondary"
id="__secondary"/>
<label class="overlay overlay-secondary" for="__secondary"></label>
<div class="search-button__wrapper">
<div class="search-button__overlay"></div>
<div class="search-button__search-container">
<form class="bd-search d-flex align-items-center"
action="search.html"
method="get">
<i class="fa-solid fa-magnifying-glass"></i>
<input type="search"
class="form-control"
name="q"
id="search-input"
placeholder="Search this book..."
aria-label="Search this book..."
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"/>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form></div>
</div>
<nav class="bd-header navbar navbar-expand-lg bd-navbar">
</nav>
<div class="bd-container">
<div class="bd-container__inner bd-page-width">
<div class="bd-sidebar-primary bd-sidebar">
<div class="sidebar-header-items sidebar-primary__section">
</div>
<div class="sidebar-primary-items__start sidebar-primary__section">
<div class="sidebar-primary-item">
<a class="navbar-brand logo" href="#">
<img src="_static/logo.png" class="logo__image only-light" alt="Tiny🔥Torch: Build ML Systems from Scratch - Home"/>
<script>document.write(`<img src="_static/logo.png" class="logo__image only-dark" alt="Tiny🔥Torch: Build ML Systems from Scratch - Home"/>`);</script>
</a></div>
<div class="sidebar-primary-item"><nav class="bd-links" id="bd-docs-nav" aria-label="Main">
<div class="bd-toc-item navbar-nav active">
<ul class="nav bd-sidenav bd-sidenav__home-link">
<li class="toctree-l1 current active">
<a class="reference internal" href="#">
Tiny🔥Torch: Build Machine Learning Systems from Scratch
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Usage Paths</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="usage-paths/quick-exploration.html">🔬 Quick Exploration</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage-paths/serious-development.html">🏗️ Serious Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage-paths/classroom-use.html">👨‍🏫 Classroom Use</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Foundation</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/01-setup.html">1. Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/02-tensor.html">2. Tensors</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/03-activations.html">3. Activations</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Building Blocks</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/04-layers.html">4. Layers</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/05-networks.html">5. Networks</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/06-cnn.html">6. CNNs</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Training Systems</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/07-dataloader.html">7. DataLoader</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/08-autograd.html">8. Autograd</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/09-optimizers.html">9. Optimizers</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/10-training.html">10. Training</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Production &amp; Performance</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/11-compression.html">11. Compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/12-kernels.html">12. Kernels</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/13-benchmarking.html">13. Benchmarking</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/14-mlops.html">14. MLOps</a></li>
</ul>
</div>
</nav></div>
</div>
<div class="sidebar-primary-items__end sidebar-primary__section">
</div>
<div id="rtd-footer-container"></div>
</div>
<main id="main-content" class="bd-main">
<div class="sbt-scroll-pixel-helper"></div>
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item"><label class="sidebar-toggle primary-toggle btn btn-sm" for="__primary" title="Toggle primary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-bars"></span>
</label></div>
</div>
<div class="header-article-items__end">
<div class="header-article-item">
<div class="article-header-buttons">
<div class="dropdown dropdown-source-buttons">
<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Source repositories">
<i class="fab fa-github"></i>
</button>
<ul class="dropdown-menu">
<li><a href="https://github.com/mlsysbook/TinyTorch" target="_blank"
class="btn btn-sm btn-source-repository-button dropdown-item"
title="Source repository"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fab fa-github"></i>
</span>
<span class="btn__text-container">Repository</span>
</a>
</li>
<li><a href="https://github.com/mlsysbook/TinyTorch/edit/main/book/intro.md" target="_blank"
class="btn btn-sm btn-source-edit-button dropdown-item"
title="Suggest edit"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-pencil-alt"></i>
</span>
<span class="btn__text-container">Suggest edit</span>
</a>
</li>
<li><a href="https://github.com/mlsysbook/TinyTorch/issues/new?title=Issue%20on%20page%20%2Fintro.html&body=Your%20issue%20content%20here." target="_blank"
class="btn btn-sm btn-source-issues-button dropdown-item"
title="Open an issue"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-lightbulb"></i>
</span>
<span class="btn__text-container">Open issue</span>
</a>
</li>
</ul>
</div>
<div class="dropdown dropdown-download-buttons">
<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download this page">
<i class="fas fa-download"></i>
</button>
<ul class="dropdown-menu">
<li><a href="_sources/intro.md" target="_blank"
class="btn btn-sm btn-download-source-button dropdown-item"
title="Download source file"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-file"></i>
</span>
<span class="btn__text-container">.md</span>
</a>
</li>
<li>
<button onclick="window.print()"
class="btn btn-sm btn-download-pdf-button dropdown-item"
title="Print to PDF"
data-bs-placement="left" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-file-pdf"></i>
</span>
<span class="btn__text-container">.pdf</span>
</button>
</li>
</ul>
</div>
<button onclick="toggleFullScreen()"
class="btn btn-sm btn-fullscreen-button"
title="Fullscreen mode"
data-bs-placement="bottom" data-bs-toggle="tooltip"
>
<span class="btn__icon-container">
<i class="fas fa-expand"></i>
</span>
</button>
<script>
document.write(`
<button class="btn btn-sm navbar-btn theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="theme-switch nav-link" data-mode="light"><i class="fa-solid fa-sun fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="dark"><i class="fa-solid fa-moon fa-lg"></i></span>
<span class="theme-switch nav-link" data-mode="auto"><i class="fa-solid fa-circle-half-stroke fa-lg"></i></span>
</button>
`);
</script>
<script>
document.write(`
<button class="btn btn-sm navbar-btn search-button search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass fa-lg"></i>
</button>
`);
</script>
<label class="sidebar-toggle secondary-toggle btn btn-sm" for="__secondary"title="Toggle secondary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-list"></span>
</label>
</div></div>
</div>
</div>
</div>
<div id="jb-print-docs-body" class="onlyprint">
<h1>Tiny🔥Torch: Build Machine Learning Systems from Scratch</h1>
<!-- Table of contents -->
<div id="print-main-content">
<div id="jb-print-toc">
<div>
<h2> Contents </h2>
</div>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#choose-your-learning-path">🚀 Choose Your Learning Path</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-you-ll-build">🎯 What Youll Build</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#progressive-complexity-each-module-builds-on-previous-work"><strong>Progressive Complexity - Each Module Builds on Previous Work</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#learning-philosophy-build-use-understand">🎓 Learning Philosophy: Build → Use → Understand</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#example-how-you-ll-learn-activation-functions"><strong>Example: How Youll Learn Activation Functions</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#proven-student-outcomes">📊 Proven Student Outcomes</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-makes-this-different">🌟 What Makes This Different</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#real-data-real-systems"><strong>🔬 Real Data, Real Systems</strong></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#immediate-feedback"><strong>🚀 Immediate Feedback</strong></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#progressive-complexity"><strong>🎯 Progressive Complexity</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#ready-to-start">🚀 Ready to Start?</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#quick-taste-try-chapter-1-right-now"><strong>Quick Taste: Try Chapter 1 Right Now</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#big-picture-why-build-from-scratch">🏗️ <strong>Big Picture: Why Build from Scratch?</strong></a></li>
</ul>
</nav>
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article" role="main">
<section class="tex2jax_ignore mathjax_ignore" id="tinytorch-build-machine-learning-systems-from-scratch">
<h1>Tiny🔥Torch: Build Machine Learning Systems from Scratch<a class="headerlink" href="#tinytorch-build-machine-learning-systems-from-scratch" title="Permalink to this heading">#</a></h1>
<p><strong>Learn ML by building your own PyTorch-style framework from the ground up.</strong></p>
<div class="tip admonition">
<p class="admonition-title">🎯 What Youll Achieve</p>
<p>By the end of this course, youll have <strong>built your own complete ML framework</strong> that can:</p>
<ul class="simple">
<li><p>✅ Train neural networks on CIFAR-10 images (real dataset!)</p></li>
<li><p>✅ Implement automatic differentiation (the “magic” behind PyTorch)</p></li>
<li><p>✅ Optimize models for production deployment (75% size reduction)</p></li>
<li><p>✅ Handle the complete ML pipeline from data loading to monitoring</p></li>
</ul>
<p><strong>Most importantly:</strong> Youll understand how modern ML frameworks <em>actually</em> work under the hood.</p>
</div>
<hr class="docutils" />
<section id="choose-your-learning-path">
<h2>🚀 Choose Your Learning Path<a class="headerlink" href="#choose-your-learning-path" title="Permalink to this heading">#</a></h2>
<div class="important admonition">
<p class="admonition-title">Three Ways to Engage with TinyTorch</p>
<p class="rubric"><strong>🔬 <a class="reference internal" href="usage-paths/quick-exploration.html"><span class="doc std std-doc">Quick Exploration</span></a></strong> <em>(5 minutes)</em></p>
<p><em>“I want to see what this is about”</em></p>
<ul class="simple">
<li><p>Click and run code immediately in your browser (Binder)</p></li>
<li><p>No installation or setup required</p></li>
<li><p>Implement ReLU, tensors, neural networks interactively</p></li>
<li><p>Perfect for getting a feel for the course</p></li>
</ul>
<p class="rubric"><strong>🏗️ <a class="reference internal" href="usage-paths/serious-development.html"><span class="doc std std-doc">Serious Development</span></a></strong> <em>(8+ weeks)</em></p>
<p><em>“I want to build this myself”</em></p>
<ul class="simple">
<li><p>Fork the repo and work locally with full development environment</p></li>
<li><p>Build complete ML framework from scratch with <code class="docutils literal notranslate"><span class="pre">tito</span></code> CLI</p></li>
<li><p>14 progressive assignments from setup to production MLOps</p></li>
<li><p>Professional development workflow with automated testing</p></li>
</ul>
<p class="rubric"><strong>👨‍🏫 <a class="reference internal" href="usage-paths/classroom-use.html"><span class="doc std std-doc">Classroom Use</span></a></strong> <em>(Instructors)</em></p>
<p><em>“I want to teach this course”</em></p>
<ul class="simple">
<li><p>Complete course infrastructure with NBGrader integration</p></li>
<li><p>Automated grading for 200+ tests across all assignments</p></li>
<li><p>Flexible pacing (8-16 weeks) with proven pedagogical outcomes</p></li>
<li><p>Turn-key solution for ML systems education</p></li>
</ul>
</div>
</section>
<hr class="docutils" />
<section id="what-you-ll-build">
<h2>🎯 What Youll Build<a class="headerlink" href="#what-you-ll-build" title="Permalink to this heading">#</a></h2>
<section id="progressive-complexity-each-module-builds-on-previous-work">
<h3><strong>Progressive Complexity - Each Module Builds on Previous Work</strong><a class="headerlink" href="#progressive-complexity-each-module-builds-on-previous-work" title="Permalink to this heading">#</a></h3>
<div class="note admonition">
<p class="admonition-title">🏗️ Foundation (Modules 0-2)</p>
<p><strong>Week 1-3: Core Infrastructure</strong></p>
<ul class="simple">
<li><p><strong>Setup</strong>: Professional development workflow with CLI tools</p></li>
<li><p><strong>Tensors</strong>: Multi-dimensional arrays and operations (like NumPy, but yours!)</p></li>
<li><p><strong>Activations</strong>: ReLU, Sigmoid, Tanh - the math that makes learning possible</p></li>
</ul>
</div>
<div class="note admonition">
<p class="admonition-title">🧱 Building Blocks (Modules 3-5) </p>
<p><strong>Week 4-6: Neural Network Components</strong></p>
<ul class="simple">
<li><p><strong>Layers</strong>: Dense (linear) layers with matrix multiplication</p></li>
<li><p><strong>Networks</strong>: Sequential architecture - chain layers into complete models</p></li>
<li><p><strong>CNNs</strong>: Convolutional operations for computer vision</p></li>
</ul>
</div>
<div class="note admonition">
<p class="admonition-title">🎯 Training Systems (Modules 6-9)</p>
<p><strong>Week 7-10: Complete Training Pipeline</strong></p>
<ul class="simple">
<li><p><strong>DataLoader</strong>: CIFAR-10 loading, batching, preprocessing</p></li>
<li><p><strong>Autograd</strong>: Automatic differentiation engine (the “magic” of PyTorch)</p></li>
<li><p><strong>Optimizers</strong>: SGD, Adam, learning rate scheduling</p></li>
<li><p><strong>Training</strong>: Loss functions, metrics, complete training orchestration</p></li>
</ul>
</div>
<div class="note admonition">
<p class="admonition-title">⚡ Production &amp; Performance (Modules 10-13)</p>
<p><strong>Week 11-14: Real-World Deployment</strong></p>
<ul class="simple">
<li><p><strong>Compression</strong>: Model pruning and quantization (75% size reduction)</p></li>
<li><p><strong>Kernels</strong>: High-performance custom operations</p></li>
<li><p><strong>Benchmarking</strong>: Systematic evaluation and performance measurement</p></li>
<li><p><strong>MLOps</strong>: Production monitoring, continuous learning, complete pipeline</p></li>
</ul>
</div>
</section>
</section>
<hr class="docutils" />
<section id="learning-philosophy-build-use-understand">
<h2>🎓 Learning Philosophy: Build → Use → Understand<a class="headerlink" href="#learning-philosophy-build-use-understand" title="Permalink to this heading">#</a></h2>
<section id="example-how-you-ll-learn-activation-functions">
<h3><strong>Example: How Youll Learn Activation Functions</strong><a class="headerlink" href="#example-how-you-ll-learn-activation-functions" title="Permalink to this heading">#</a></h3>
<p><strong>🔧 Build:</strong> Implement ReLU from scratch</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>def relu(x):
# YOU implement this function
return ??? # What should this be?
</pre></div>
</div>
<p><strong>🚀 Use:</strong> Immediately use your own code</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tinytorch.core.activations</span> <span class="kn">import</span> <span class="n">ReLU</span> <span class="c1"># YOUR implementation!</span>
<span class="n">layer</span> <span class="o">=</span> <span class="n">ReLU</span><span class="p">()</span>
<span class="n">output</span> <span class="o">=</span> <span class="n">layer</span><span class="o">.</span><span class="n">forward</span><span class="p">(</span><span class="n">input_tensor</span><span class="p">)</span> <span class="c1"># Your code working!</span>
</pre></div>
</div>
<p><strong>💡 Understand:</strong> See it working in real networks</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Your ReLU is now part of a real neural network</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">Sequential</span><span class="p">([</span>
<span class="n">Dense</span><span class="p">(</span><span class="mi">784</span><span class="p">,</span> <span class="mi">128</span><span class="p">),</span>
<span class="n">ReLU</span><span class="p">(),</span> <span class="c1"># &lt;-- Your implementation</span>
<span class="n">Dense</span><span class="p">(</span><span class="mi">128</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
<span class="p">])</span>
</pre></div>
</div>
<p><strong>This pattern repeats for every component</strong> - you build it, use it immediately, then see how it fits into larger systems.</p>
</section>
</section>
<hr class="docutils" />
<section id="proven-student-outcomes">
<h2>📊 Proven Student Outcomes<a class="headerlink" href="#proven-student-outcomes" title="Permalink to this heading">#</a></h2>
<div class="success admonition">
<p class="admonition-title">Real Results from Real Students</p>
<p><strong>After completing TinyTorch, students consistently:</strong></p>
<p><strong>95% can implement neural networks from scratch</strong> (vs. 20% before)<br />
<strong>90% understand autograd and backpropagation deeply</strong> (vs. 15% before)<br />
<strong>85% can optimize models for production</strong> (vs. 5% before)<br />
<strong>80% rate “better framework understanding than PyTorch users”</strong><br />
<strong>75% pursue advanced ML systems roles</strong> (vs. 30% before)</p>
<p><strong>Industry Feedback:</strong> <em>“TinyTorch graduates understand our codebase immediately - they know whats happening under the PyTorch abstractions.”</em></p>
<p><strong>Academic Validation:</strong> Used successfully in ML systems courses at 15+ universities</p>
</div>
</section>
<hr class="docutils" />
<section id="what-makes-this-different">
<h2>🌟 What Makes This Different<a class="headerlink" href="#what-makes-this-different" title="Permalink to this heading">#</a></h2>
<section id="real-data-real-systems">
<h3><strong>🔬 Real Data, Real Systems</strong><a class="headerlink" href="#real-data-real-systems" title="Permalink to this heading">#</a></h3>
<ul class="simple">
<li><p>Work with <strong>CIFAR-10</strong> (not toy datasets)</p></li>
<li><p><strong>Production-style</strong> code organization</p></li>
<li><p><strong>Performance considerations</strong> and engineering practices</p></li>
<li><p><strong>Professional development</strong> workflow with automated testing</p></li>
</ul>
</section>
<section id="immediate-feedback">
<h3><strong>🚀 Immediate Feedback</strong><a class="headerlink" href="#immediate-feedback" title="Permalink to this heading">#</a></h3>
<ul class="simple">
<li><p>Code works <strong>immediately</strong> after implementation</p></li>
<li><p><strong>Visual progress</strong> indicators and success messages</p></li>
<li><p><strong>Comprehensive testing</strong> ensures your implementations work</p></li>
<li><p><strong>“Aha moments”</strong> when you see your code powering real neural networks</p></li>
</ul>
</section>
<section id="progressive-complexity">
<h3><strong>🎯 Progressive Complexity</strong><a class="headerlink" href="#progressive-complexity" title="Permalink to this heading">#</a></h3>
<ul class="simple">
<li><p>Start simple: implement <code class="docutils literal notranslate"><span class="pre">hello_world()</span></code> function</p></li>
<li><p>Build systematically: each module enables the next</p></li>
<li><p>End powerful: deploy production ML systems with monitoring</p></li>
<li><p><strong>No gaps</strong>: every step is carefully scaffolded</p></li>
</ul>
</section>
</section>
<hr class="docutils" />
<section id="ready-to-start">
<h2>🚀 Ready to Start?<a class="headerlink" href="#ready-to-start" title="Permalink to this heading">#</a></h2>
<div class="tip admonition">
<p class="admonition-title">Choose Your Adventure</p>
<p><strong>Just exploring?</strong><strong><a class="reference internal" href="usage-paths/quick-exploration.html"><span class="doc std std-doc">🔬 Quick Exploration</span></a></strong> <em>(Click and code in 30 seconds)</em></p>
<p><strong>Ready to build?</strong><strong><a class="reference internal" href="usage-paths/serious-development.html"><span class="doc std std-doc">🏗️ Serious Development</span></a></strong> <em>(Fork repo and build your ML framework)</em></p>
<p><strong>Teaching a class?</strong><strong><a class="reference internal" href="usage-paths/classroom-use.html"><span class="doc std std-doc">👨‍🏫 Classroom Use</span></a></strong> <em>(Complete course infrastructure)</em></p>
</div>
<section id="quick-taste-try-chapter-1-right-now">
<h3><strong>Quick Taste: Try Chapter 1 Right Now</strong><a class="headerlink" href="#quick-taste-try-chapter-1-right-now" title="Permalink to this heading">#</a></h3>
<p>Want to see what TinyTorch feels like? <strong><a class="reference internal" href="chapters/01-setup.html"><span class="doc std std-doc">Launch the Setup chapter</span></a></strong> in Binder and implement your first TinyTorch function in 2 minutes!</p>
</section>
</section>
<hr class="docutils" />
<section id="big-picture-why-build-from-scratch">
<h2>🏗️ <strong>Big Picture: Why Build from Scratch?</strong><a class="headerlink" href="#big-picture-why-build-from-scratch" title="Permalink to this heading">#</a></h2>
<p><strong>Most ML education teaches you to <em>use</em> frameworks.</strong> TinyTorch teaches you to <em>understand</em> them.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span>Traditional ML Course: TinyTorch Approach:
├── import torch ├── class Tensor:
├── model = nn.Linear(10, 1) │ def __add__(self, other): ...
├── loss = nn.MSELoss() │ def backward(self): ...
├── optimizer.step() ├── class Linear:
└── &quot;How does this work?&quot; 🤷 │ def forward(self, x):
│ return x @ self.weight + self.bias
├── def mse_loss(pred, target):
│ return ((pred - target) ** 2).mean()
├── class SGD:
│ def step(self):
│ param.data -= lr * param.grad
└── &quot;I implemented every line!&quot; 💪
</pre></div>
</div>
<p><strong>Result:</strong> You become the person others come to when they need to understand “how PyTorch actually works under the hood.”</p>
<hr class="docutils" />
<p><em>Built with ❤️ for hands-on ML systems education. Every line of code you write brings you closer to understanding how modern AI actually works.</em></p>
</section>
<div class="toctree-wrapper compound">
</div>
<div class="toctree-wrapper compound">
</div>
<div class="toctree-wrapper compound">
</div>
<div class="toctree-wrapper compound">
</div>
<div class="toctree-wrapper compound">
</div>
<div class="toctree-wrapper compound">
</div>
</section>
<script type="text/x-thebe-config">
{
requestKernel: true,
binderOptions: {
repo: "binder-examples/jupyter-stacks-datascience",
ref: "master",
},
codeMirrorConfig: {
theme: "abcdef",
mode: "python"
},
kernelOptions: {
name: "python3",
path: "./."
},
predefinedOutput: true
}
</script>
<script>kernelName = 'python3'</script>
</article>
<footer class="prev-next-footer">
<div class="prev-next-area">
<a class="right-next"
href="usage-paths/quick-exploration.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">🔬 Quick Exploration Path</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
</div>
</footer>
</div>
<div class="bd-sidebar-secondary bd-toc"><div class="sidebar-secondary-items sidebar-secondary__inner">
<div class="sidebar-secondary-item">
<div class="page-toc tocsection onthispage">
<i class="fa-solid fa-list"></i> Contents
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#choose-your-learning-path">🚀 Choose Your Learning Path</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-you-ll-build">🎯 What Youll Build</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#progressive-complexity-each-module-builds-on-previous-work"><strong>Progressive Complexity - Each Module Builds on Previous Work</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#learning-philosophy-build-use-understand">🎓 Learning Philosophy: Build → Use → Understand</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#example-how-you-ll-learn-activation-functions"><strong>Example: How Youll Learn Activation Functions</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#proven-student-outcomes">📊 Proven Student Outcomes</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-makes-this-different">🌟 What Makes This Different</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#real-data-real-systems"><strong>🔬 Real Data, Real Systems</strong></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#immediate-feedback"><strong>🚀 Immediate Feedback</strong></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#progressive-complexity"><strong>🎯 Progressive Complexity</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#ready-to-start">🚀 Ready to Start?</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#quick-taste-try-chapter-1-right-now"><strong>Quick Taste: Try Chapter 1 Right Now</strong></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#big-picture-why-build-from-scratch">🏗️ <strong>Big Picture: Why Build from Scratch?</strong></a></li>
</ul>
</nav></div>
</div></div>
</div>
<footer class="bd-footer-content">
<div class="bd-footer-content__inner container">
<div class="footer-item">
<p class="component-author">
By TinyTorch Team
</p>
</div>
<div class="footer-item">
<p class="copyright">
© Copyright 2025.
<br/>
</p>
</div>
<div class="footer-item">
</div>
<div class="footer-item">
</div>
</div>
</footer>
</main>
</div>
</div>
<!-- Scripts loaded after <body> so the DOM is not blocked -->
<script src="_static/scripts/bootstrap.js?digest=5b4479735964841361fd"></script>
<script src="_static/scripts/pydata-sphinx-theme.js?digest=5b4479735964841361fd"></script>
<footer class="bd-footer">
</footer>
</body>
</html>