Deep Learning Lab
Guide
Module 2 · 4 lessons · ~7.4 hours

PyTorch: Building Neural Networks

How do I actually build a deep learning model?

You will learn

  • Tensors
  • Shape / dtype / device
  • Broadcasting
  • nn.Module
  • Dataset & DataLoader
  • Training & validation loops

Hands-on: An MLP on tabular data, written without fit().

Engineering: Virtual environments, dependencies, Git/GitHub, project structure.

Lessons

  1. Lesson 2.1: Tensors and the Shape Contract

    Every tensor carries a three-part contract: shape, dtype and device. Nearly every PyTorch error you will ever see breaks one of those three clauses. This lesson teaches you to read shapes like sentences, reshape without lying, broadcast on purpose, see a...

    ~149 min self-study · 8 sections · 129 code cells · 5 labs
    Not started Start
  2. Lesson 2.2: Dataset and DataLoader: Feeding the Model

    How a table or a folder of files becomes the batches a network trains on. You measure why mini-batches matter even when memory doesn't, split before preprocessing so nothing leaks, encode a real mixed-type table, write your own Dataset (in memory and...

    ~100 min self-study · 8 sections · 62 code cells · 3 labs
    Not started Start
  3. Lesson 2.3: Building and Training an MLP You Can Defend

    You build a real MLP for the Bank Marketing data and defend every choice: how nn.Module registers parameters (and the silent bug when it doesn't), how to compose blocks, how to trace shapes with hooks, why the loss takes logits, a training loop with...

    ~117 min self-study · 10 sections · 52 code cells · 5 labs
    Not started Start
  4. Lesson 2.4: From Notebook to Project

    You turn Lessons 2.1–2.3 into a small repository someone else can clone, install, test and run without opening a notebook: code extracted into importable modules under src/, every experiment described by a YAML config, seeds (and what they cannot promise),...

    ~76 min self-study · 7 sections · 25 code cells · 4 labs
    Not started Start

Module challenge

Earns the Module 2 badge

Module 2 challenge: building a network you can defend

8 scenario questions that mix ideas from all 4 lessons. One question at a time, an explanation after each, and your score at the end. Pass mark 75%, so 6 of 8.

not attempted

Best after you have practised all 4 lessons.