Chapter 2

Models as Functions

Inputs, parameters, outputs, forward passes, predictions, and capacity as a function family.

What this chapter does

A neural model is a function with parameters. This chapter separates data from learned values, explains what a forward pass computes, and shows why prediction must happen before learning.

Lessons

Read these in order.

Start with the chapter introduction, then move through the topic lessons. The order is chosen so each page can reuse ideas from the pages before it.

  1. 01
    Introduction

    Why a model is best read as a function with parameters.

  2. 02
    Inputs, Parameters, and Outputs

    The three roles in a model computation: supplied data, learned values, and computed predictions.

  3. 03
    Model as a Function

    Reading f(x; theta) as a prediction function controlled by parameters.

  4. 04
    Forward Pass

    The left-to-right computation that turns inputs into predictions.

  5. 05
    Parameters Versus Data

    Separating values supplied by the dataset from values learned by the model.

  6. 06
    Prediction Before Learning

    Why a model must compute predictions before loss, gradients, and updates can help.

  7. 07
    Capacity as a Function Family

    How an architecture defines possible functions and parameters choose one.

Before moving on

  • Explain a model as f(x; theta).
  • Separate inputs, targets, predictions, and parameters.
  • Trace one forward pass without assuming learning happens inside it.
  • Describe capacity as the function family an architecture can represent.

Where this leads

  • Linear Models and Scores
  • Losses for Learning
  • Computation Graphs
  • Training loops

Chapter progress