Code QuizIntermediate

PyTorch Training Loop

Find the missing step that makes gradients accumulate wrongly.

Codepython
for x, y in loader:
    output = model(x)
    loss = criterion(output, y)
    loss.backward()
    optimizer.step()

What is the bug in this training loop?