Files
TinyTorch/book/_build/html/quickstart-guide.html
Vijay Janapa Reddi 04cbc65724 Fix training pipeline: Parameter class, Variable.sum(), gradient handling
Major fixes for complete training pipeline functionality:

Core Components Fixed:
- Parameter class: Now wraps Variables with requires_grad=True for proper gradient tracking
- Variable.sum(): Essential for scalar loss computation from multi-element tensors
- Gradient handling: Fixed memoryview issues in autograd and activations
- Tensor indexing: Added __getitem__ support for weight inspection

Training Results:
- XOR learning: 100% accuracy (4/4) - network successfully learns XOR function
- Linear regression: Weight=1.991 (target=2.0), Bias=0.980 (target=1.0)
- Integration tests: 21/22 passing (95.5% success rate)
- Module tests: All individual modules passing
- General functionality: 4/5 tests passing with core training working

Technical Details:
- Fixed gradient data access patterns throughout activations.py
- Added safe memoryview handling in Variable.backward()
- Implemented proper Parameter-Variable delegation
- Added Tensor subscripting for debugging access

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 19:14:11 -04:00

751 lines
34 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="viewport" content="width=device-width, initial-scale=1" />
<title>Quick Start Guide &#8212; TinyTorch</title>
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
</script>
<!-- Loaded before other Sphinx assets -->
<link href="_static/styles/theme.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link href="_static/styles/bootstrap.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link href="_static/styles/pydata-sphinx-theme.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link href="_static/vendor/fontawesome/6.5.2/css/all.min.css?digest=dfe6caa3a7d634c4db9b" rel="stylesheet" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=eba8b062" />
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.8ecb98da25f57f5357bf6f572d296f466b2cfe2517ffebfabe82451661e28f02.css?v=6644e6bb" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=b7a97b18" />
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=dfe6caa3a7d634c4db9b" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
<script src="_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
<script src="_static/documentation_options.js?v=9eb32ce0"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=f281be69"></script>
<script src="_static/scripts/sphinx-book-theme.js?v=887ef09a"></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?v=4a39c7ea"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
<script src="_static/design-tabs.js?v=f930bc37"></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?v=c100c467"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</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>DOCUMENTATION_OPTIONS.pagename = 'quickstart-guide';</script>
<link rel="icon" href="_static/favicon.svg"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="TinyTorch for Instructors: Complete ML Systems Course" href="usage-paths/classroom-use.html" />
<link rel="prev" title="TinyTorch: Build ML Systems from Scratch" href="intro.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="">
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">Skip to main content</a></div>
<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"
id="pst-primary-sidebar-checkbox"/>
<label class="overlay overlay-primary" for="pst-primary-sidebar-checkbox"></label>
<input type="checkbox"
class="sidebar-toggle"
id="pst-secondary-sidebar-checkbox"/>
<label class="overlay overlay-secondary" for="pst-secondary-sidebar-checkbox"></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>
<div class="pst-async-banner-revealer d-none">
<aside id="bd-header-version-warning" class="d-none d-print-none" aria-label="Version warning"></aside>
</div>
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
</header>
<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="intro.html">
<img src="_static/logo-tinytorch-white.png" class="logo__image only-light" alt="TinyTorch - Home"/>
<script>document.write(`<img src="_static/logo-tinytorch-white.png" class="logo__image only-dark" alt="TinyTorch - Home"/>`);</script>
</a></div>
<div class="sidebar-primary-item">
<script>
document.write(`
<button class="btn search-button-field search-button__button" title="Search" aria-label="Search" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
`);
</script></div>
<div class="sidebar-primary-item"><nav class="bd-links 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">
<a class="reference internal" href="intro.html">
TinyTorch: Build ML Systems from Scratch
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🚀 Getting Started</span></p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Quick Start Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage-paths/classroom-use.html">For Instructors</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🛠️ Using TinyTorch</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="tito-essentials.html">Essential Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="learning-progress.html">Track Your Progress</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🧭 Course Orientation</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/00-introduction.html">Introduction</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/02-tensor.html">01. Tensor</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/03-activations.html">02. Activations</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/04-layers.html">03. Layers</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/05-dense.html">04. Losses</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🧠 Learning Systems</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/09-autograd.html">05. Autograd</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/10-optimizers.html">06. Optimizers</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/11-training.html">07. Training</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/06-spatial.html">08. Spatial</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🏗️ Neural Architectures</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/08-dataloader.html">09. DataLoader</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/11-tokenization.html">10. Tokenization</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/12-embeddings.html">11. Embeddings</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/07-attention.html">12. Attention</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/16-tinygpt.html">13. Transformers</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">⚡ Performance Optimization</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="chapters/15-profiling.html">14. Profiling</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/13-kernels.html">15. Acceleration</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/17-quantization.html">16. Quantization</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/12-compression.html">17. Compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/19-caching.html">18. KV Caching</a></li>
<li class="toctree-l1"><a class="reference internal" href="chapters/14-benchmarking.html">19. Benchmarking</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🏅 Community &amp; Competition</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="leaderboard.html">Leaderboard</a></li>
<li class="toctree-l1"><a class="reference internal" href="competitions.html">Competitions</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">🛠️ Resources &amp; Tools</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="checkpoint-system.html">Progress Tracking</a></li>
<li class="toctree-l1"><a class="reference internal" href="testing-framework.html">Testing Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="resources.html">Additional Resources</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" role="main">
<div class="sbt-scroll-pixel-helper"></div>
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article d-print-none">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item"><button class="sidebar-toggle primary-toggle btn btn-sm" title="Toggle primary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-bars"></span>
</button></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/quickstart-guide.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%2Fquickstart-guide.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/quickstart-guide.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 nav-link pst-navbar-icon theme-switch-button" title="light/dark" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip">
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto"></i>
</button>
`);
</script>
<script>
document.write(`
<button class="btn btn-sm pst-navbar-icon 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>
<button class="sidebar-toggle secondary-toggle btn btn-sm" title="Toggle secondary sidebar" data-bs-placement="bottom" data-bs-toggle="tooltip">
<span class="fa-solid fa-list"></span>
</button>
</div></div>
</div>
</div>
</div>
<div id="jb-print-docs-body" class="onlyprint">
<h1>Quick Start Guide</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="#minute-setup-verification">⚡ 2-Minute Setup Verification</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#minute-first-module-walkthrough">🏗️ 15-Minute First Module Walkthrough</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#module-01-tensor-foundations">Module 01: Tensor Foundations</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#next-step-module-02-activations">Next Step: Module 02 - Activations</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#track-your-progress">📊 Track Your Progress</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-you-just-accomplished">🎯 What You Just Accomplished</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#your-next-steps">🚀 Your Next Steps</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#immediate-next-actions-choose-one">Immediate Next Actions (Choose One):</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#pro-tips-for-continued-success">💡 Pro Tips for Continued Success</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#youre-now-a-tinytorch-builder">🌟 Youre Now a TinyTorch Builder!</a></li>
</ul>
</nav>
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article">
<section id="quick-start-guide">
<h1>Quick Start Guide<a class="headerlink" href="#quick-start-guide" title="Link to this heading">#</a></h1>
<div style="background: #f8f9fa; padding: 2rem; border-radius: 0.5rem; margin: 2rem 0; text-align: center;">
<h2 style="margin: 0 0 1rem 0; color: #495057;">From Zero to Building Neural Networks</h2>
<p style="margin: 0; font-size: 1.1rem; color: #6c757d;">Complete setup + first module in 15 minutes</p>
</div>
<p><strong>Purpose</strong>: Get hands-on experience building ML systems in 15 minutes. Complete setup verification and build your first neural network component from scratch.</p>
<section id="minute-setup-verification">
<h2>⚡ 2-Minute Setup Verification<a class="headerlink" href="#minute-setup-verification" title="Link to this heading">#</a></h2>
<p>Lets make sure youre ready to build ML systems:</p>
<div style="background: #e3f2fd; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #2196f3; margin: 1.5rem 0;">
<h4 style="margin: 0 0 1rem 0; color: #1976d2;">Step 1: Install & Verify</h4>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Clone and install</span>
git<span class="w"> </span>clone<span class="w"> </span>https://github.com/veekaybee/tinytorch.git
<span class="nb">cd</span><span class="w"> </span>tinytorch
pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.
</pre></div>
</div>
<p><strong>Expected output:</strong> A working TinyTorch development environment ready for hands-on building.</p>
<p><strong>📖 See <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a></strong> for complete setup verification and troubleshooting.</p>
</div>
<div style="background: #f0fdf4; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #22c55e; margin: 1.5rem 0;">
<h4 style="margin: 0 0 1rem 0; color: #15803d;">Step 2: Verify Your Starting Point</h4>
<p>Confirm youre ready to begin building ML systems from scratch. Your development environment should be configured and ready for hands-on implementation.</p>
<p><strong>📖 See <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a></strong> for verification commands and troubleshooting.</p>
</div>
</section>
<section id="minute-first-module-walkthrough">
<h2>🏗️ 15-Minute First Module Walkthrough<a class="headerlink" href="#minute-first-module-walkthrough" title="Link to this heading">#</a></h2>
<p>Lets build your first neural network component and unlock your first capability:</p>
<section id="module-01-tensor-foundations">
<h3>Module 01: Tensor Foundations<a class="headerlink" href="#module-01-tensor-foundations" title="Link to this heading">#</a></h3>
<div style="background: #fffbeb; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f59e0b; margin: 1.5rem 0;">
<p><strong>🎯 Learning Goal:</strong> Build N-dimensional arrays - the foundation of all neural networks</p>
<p><strong>⏱️ Time:</strong> 15 minutes</p>
<p><strong>💻 Action:</strong> Start with Module 01 to build tensor operations from scratch.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Navigate to the tensor module</span>
<span class="nb">cd</span><span class="w"> </span>modules/01_tensor
jupyter<span class="w"> </span>lab<span class="w"> </span>tensor_dev.py
</pre></div>
</div>
<p>Youll implement core tensor operations:</p>
<ul class="simple">
<li><p>N-dimensional array creation</p></li>
<li><p>Basic mathematical operations (add, multiply, matmul)</p></li>
<li><p>Shape manipulation (reshape, transpose)</p></li>
<li><p>Memory layout understanding</p></li>
</ul>
<p><strong>Key Implementation:</strong> Build the <code class="docutils literal notranslate"><span class="pre">Tensor</span></code> class that forms the foundation of all neural networks</p>
<p><strong>📖 See <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a></strong> for module workflow commands.</p>
<p><strong>✅ Achievement Unlocked:</strong> Foundation capability - “Can I create and manipulate the building blocks of ML?”</p>
</div>
</section>
<section id="next-step-module-02-activations">
<h3>Next Step: Module 02 - Activations<a class="headerlink" href="#next-step-module-02-activations" title="Link to this heading">#</a></h3>
<div style="background: #fdf2f8; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #ec4899; margin: 1.5rem 0;">
<p><strong>🎯 Learning Goal:</strong> Add nonlinearity - the key to neural network intelligence</p>
<p><strong>⏱️ Time:</strong> 10 minutes</p>
<p><strong>💻 Action:</strong> Continue with Module 02 to add activation functions.</p>
<p>Youll implement essential activation functions:</p>
<ul class="simple">
<li><p>ReLU (Rectified Linear Unit) - the workhorse of deep learning</p></li>
<li><p>Softmax - for probability distributions</p></li>
<li><p>Understand gradient flow and numerical stability</p></li>
<li><p>Learn why nonlinearity enables learning</p></li>
</ul>
<p><strong>Key Implementation:</strong> Build activation functions that allow neural networks to learn complex patterns</p>
<p><strong>📖 See <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a></strong> for module development workflow.</p>
<p><strong>✅ Achievement Unlocked:</strong> Intelligence capability - “Can I add nonlinearity to enable learning?”</p>
</div>
</section>
</section>
<section id="track-your-progress">
<h2>📊 Track Your Progress<a class="headerlink" href="#track-your-progress" title="Link to this heading">#</a></h2>
<p>After completing your first modules:</p>
<div style="background: #f8f9fa; padding: 1.5rem; border: 1px solid #dee2e6; border-radius: 0.5rem; margin: 1.5rem 0;">
<p><strong>Check your new capabilities:</strong> Track your progress through the 21-checkpoint system to see your growing ML systems expertise.</p>
<p><strong>📖 See <a class="reference internal" href="#learning-progress.html"><span class="xref myst">Track Your Progress</span></a></strong> for detailed capability tracking and <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a>** for progress monitoring commands.</p>
</div>
</section>
<section id="what-you-just-accomplished">
<h2>🎯 What You Just Accomplished<a class="headerlink" href="#what-you-just-accomplished" title="Link to this heading">#</a></h2>
<p>In 15 minutes, youve:</p>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 2rem 0;">
<div style="background: #e6fffa; padding: 1rem; border-radius: 0.5rem; border-left: 3px solid #26d0ce;">
<h4 style="margin: 0 0 0.5rem 0; color: #0d9488;">🔧 Setup Complete</h4>
<p style="margin: 0; font-size: 0.9rem;">Installed TinyTorch and verified your environment</p>
</div>
<div style="background: #f0f9ff; padding: 1rem; border-radius: 0.5rem; border-left: 3px solid #3b82f6;">
<h4 style="margin: 0 0 0.5rem 0; color: #1d4ed8;">🧱 Created Foundation</h4>
<p style="margin: 0; font-size: 0.9rem;">Implemented core tensor operations from scratch</p>
</div>
<div style="background: #fefce8; padding: 1rem; border-radius: 0.5rem; border-left: 3px solid #eab308;">
<h4 style="margin: 0 0 0.5rem 0; color: #a16207;">🏆 First Capability</h4>
<p style="margin: 0; font-size: 0.9rem;">Earned your first ML systems capability checkpoint</p>
</div>
</div>
</section>
<section id="your-next-steps">
<h2>🚀 Your Next Steps<a class="headerlink" href="#your-next-steps" title="Link to this heading">#</a></h2>
<div style="background: #f8f9fa; padding: 2rem; border-radius: 0.5rem; margin: 2rem 0;">
<section id="immediate-next-actions-choose-one">
<h3>Immediate Next Actions (Choose One):<a class="headerlink" href="#immediate-next-actions-choose-one" title="Link to this heading">#</a></h3>
<p><strong>🔥 Continue Building (Recommended):</strong> Begin Module 03 to add intelligence to your network with nonlinear activation functions.</p>
<p><strong>📚 Learn the Workflow:</strong></p>
<ul class="simple">
<li><p><strong>📖 See <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a></strong> for complete TITO command guide</p></li>
<li><p><strong>📖 See <a class="reference internal" href="#learning-progress.html"><span class="xref myst">Track Your Progress</span></a></strong> for the full learning path</p></li>
</ul>
<p><strong>🎓 For Instructors:</strong></p>
<ul class="simple">
<li><p><strong>📖 See <a class="reference internal" href="#usage-paths/classroom-use.html"><span class="xref myst">Classroom Setup Guide</span></a></strong> for NBGrader integration and grading workflow</p></li>
</ul>
</div>
</section>
</section>
<section id="pro-tips-for-continued-success">
<h2>💡 Pro Tips for Continued Success<a class="headerlink" href="#pro-tips-for-continued-success" title="Link to this heading">#</a></h2>
<div style="background: #fff5f5; padding: 1.5rem; border: 1px solid #fed7d7; border-radius: 0.5rem; margin: 1rem 0;">
<p><strong>Essential Development Practices:</strong></p>
<ul class="simple">
<li><p>Always verify your environment before starting</p></li>
<li><p>Track your progress through capability checkpoints</p></li>
<li><p>Follow the standard module development workflow</p></li>
<li><p>Use diagnostic commands when debugging issues</p></li>
</ul>
<p><strong>📖 See <a class="reference internal" href="#tito-essentials.html"><span class="xref myst">Essential Commands</span></a></strong> for complete workflow commands and troubleshooting guide.</p>
</div>
</section>
<section id="youre-now-a-tinytorch-builder">
<h2>🌟 Youre Now a TinyTorch Builder!<a class="headerlink" href="#youre-now-a-tinytorch-builder" title="Link to this heading">#</a></h2>
<div style="background: #f8f9fa; padding: 2rem; border-radius: 0.5rem; margin: 2rem 0; text-align: center;">
<h3 style="margin: 0 0 1rem 0; color: #495057;">Ready to Build Production ML Systems</h3>
<p style="margin: 0 0 1.5rem 0; color: #6c757d;">You've proven you can build ML components from scratch. Time to keep going!</p>
<a href="chapters/03-activations.html" style="display: inline-block; background: #007bff; color: white; padding: 0.75rem 1.5rem; border-radius: 0.25rem; text-decoration: none; font-weight: 500; margin-right: 1rem;">Continue Building →</a>
<a href="tito-essentials.html" style="display: inline-block; background: #28a745; color: white; padding: 0.75rem 1.5rem; border-radius: 0.25rem; text-decoration: none; font-weight: 500;">Master Commands →</a>
</div>
<hr class="docutils" />
<p><strong>What makes TinyTorch different:</strong> Youre not just learning <em>about</em> neural networks—youre building them from fundamental mathematical operations. Every line of code you write builds toward complete ML systems mastery.</p>
<p><strong>Next milestone:</strong> After Module 08, youll train real neural networks on actual datasets using 100% your own code!</p>
</section>
</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 d-print-none">
<div class="prev-next-area">
<a class="left-prev"
href="intro.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">TinyTorch: Build ML Systems from Scratch</p>
</div>
</a>
<a class="right-next"
href="usage-paths/classroom-use.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">TinyTorch for Instructors: Complete ML Systems Course</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="#minute-setup-verification">⚡ 2-Minute Setup Verification</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#minute-first-module-walkthrough">🏗️ 15-Minute First Module Walkthrough</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#module-01-tensor-foundations">Module 01: Tensor Foundations</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#next-step-module-02-activations">Next Step: Module 02 - Activations</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#track-your-progress">📊 Track Your Progress</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#what-you-just-accomplished">🎯 What You Just Accomplished</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#your-next-steps">🚀 Your Next Steps</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#immediate-next-actions-choose-one">Immediate Next Actions (Choose One):</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#pro-tips-for-continued-success">💡 Pro Tips for Continued Success</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#youre-now-a-tinytorch-builder">🌟 Youre Now a TinyTorch Builder!</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 Prof. Vijay Janapa Reddi (Harvard University)
</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=dfe6caa3a7d634c4db9b"></script>
<script src="_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b"></script>
<footer class="bd-footer">
</footer>
</body>
</html>