| Quick Reference NN CheatsheetNeural networks on one page — neurons, shapes, backprop, losses, and the traps around logits, gradients, and eval mode. 10 sections 10 tables 14 code snippets A small networkHidden ReLU, linear head Loss on logits What a network is
This page is a neural network in PyTorch. Conv nets, sequence models, and hosted GenAI APIs are left out. One unitThe weighted sum What each part does
ShapesWeight layout Which axis is which
The forward passCall the module What runs
BackpropFill the gradients The chain rule
LossesLogits and class indices Index dtype Match the head
One updateClear, backward, step Why this order
ParametersFreeze every parameter What is trainable
InitializationDefault Linear scale Starting values
Interview trapsScore without a graph The class is the argmax Eval is a mode switch Traps worth memorising
How to use this page: call the module, train on logits with class indices, and clear the gradient before each backward. Score inside |