Error decoder
Paste the error. Get the fix.
PyTorch's messages are exact but terse. Paste one (the last line is enough) and see what it means in plain words, a small program that breaks the same way, the fix, and the lesson that teaches it. Every example here is run on real PyTorch, so the messages are the real ones.