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.
- 01Introduction
Why a model is best read as a function with parameters.
- 02Inputs, Parameters, and Outputs
The three roles in a model computation: supplied data, learned values, and computed predictions.
- 03Model as a Function
Reading f(x; theta) as a prediction function controlled by parameters.
- 04Forward Pass
The left-to-right computation that turns inputs into predictions.
- 05Parameters Versus Data
Separating values supplied by the dataset from values learned by the model.
- 06Prediction Before Learning
Why a model must compute predictions before loss, gradients, and updates can help.
- 07Capacity as a Function Family
How an architecture defines possible functions and parameters choose one.
Review and practice
Close the chapter deliberately.
Use the conclusion and revision notes before the chapter exercises. Hints and solutions are collected here, while lesson-level exercises reveal their own help inline.
What Chapter 2 established before linear models and score vectors.
Summary and Revision NotesA compact review of model functions, parameters, and forward passes.
ExercisesChapter-level practice for models as functions.
HintsLow-spoiler nudges for the Chapter 2 exercises.
SolutionsExplained solutions for the Chapter 2 exercises.
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