0Pricing
Deep Learning Academy · Lesson

Inspect Parameters and Layer Shapes

See exactly what your model holds.

Look Inside Your Model

Once a model exists, you can peek at every weight it holds. Inspecting the parameters builds trust before you train.

Loop Over parameters()

Call model.parameters() to iterate over every learnable tensor. The optimizer uses this exact same list.

for p in model.parameters():
    print(p.shape)

All lessons in this course

  1. Subclass nn.Module: __init__ and forward
  2. Stacking Linear Layers
  3. nn.Sequential for Quick Models
  4. Inspect Parameters and Layer Shapes
← Back to Deep Learning Academy