Put in order · Python course · Module 9: Machine Learning
PyTorch Training Loop
Arrange the steps of the training loop in PyTorch:
Items to put in order
- Forward pass - outputs = model(X)
- Compute loss
- loss.backward()
- optimizer.step()
- optimizer.zero_grad()
You can check the correct answer by solving this task in the CodeWorlds game.