A comprehensive reference covering the 10 most common PyTorch RuntimeErrors related to tensor shapes. Each error includes the exact error text, root cause analysis, and a concrete code fix.
Quick-reference formulas for every common neural network layer type. Includes worked examples with real numbers for Conv2d, Linear, LSTM, MaxPool2d, and more.
TENSOR PREFLIGHT · DOWNLOADABLE PYTORCH TOOLKIT
Trace a local forward pass, inspect tensor shapes in an HTML report, and turn a repair into a regression check. Includes eight broken-and-fixed workflows, source code and setup instructions.
Python 3.9+ · PyTorch 2.8+ · Runs locally