Deep Learning Section 032

Debugging PyTorch

The errors everyone hits, and a method for the worst case of all — code that runs perfectly and learns nothing.

9 of 9 lessons published Three reading levels on every lesson

Start with “Reading a shape error”

Lessons in order

Work top to bottom. Each lesson assumes the one above it.

  1. Reading a shape error
  2. Expected all tensors to be on the same device
  3. Expected scalar type Float but found Double
  4. When the loss will not go down
  5. Overfit a single batch first
  6. Tracking down a NaN loss
  7. Checking that gradients reach every layer
  8. Memory that grows every epoch
  9. Finding label and target bugs