Asked about Autograd, custom pieces and performance

Why might a tensor's gradient be None after backward?

An answer that works

The operation that produced it was not recorded in the autograd graph, usually because it was detached, created from a Python number, or computed inside no_grad. Autograd can only backpropagate through what it recorded.

Reading an answer is not being able to give one. The section that teaches this is Autograd, custom pieces and performance, 5 hours of PyTorch.

Learn this properly