Find the missing step that makes gradients accumulate wrongly.
for x, y in loader: output = model(x) loss = criterion(output, y) loss.backward() optimizer.step()
What is the bug in this training loop?