TorchLean

2. Building Models🔗

An architecture is still only a recipe. It cannot make a prediction until shapes meet data and a seed produces parameters. Here we turn the model into a small training program, one ordinary step at a time: load a batch, evaluate the forward map, measure a loss, run backward, and update the parameters. Each step leaves an object we can inspect rather than hiding the whole loop behind a single call.

  1. 2.1. Tensors That Remember Their Shapes
  2. 2.2. Building A Model
  3. 2.3. From Files To Typed Minibatches
  4. 2.4. Training, One State Transition At A Time
  5. 2.5. The TorchLean API