Review this PyTorch training loop.
Training is unstable and the loss behaves erratically. What's missing?