✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
The following function trains a neural network for one epoch. The body of the inner loop consists of 5 statements, listed below in scrambled order. Put them in the correct execution order (1. = first, 5.=last).
Ignore optimizer.zero_grad() and code indentation for this example.
def update(network: nn.Module, data: DataLoader, loss: nn.Module,optimizer:optim.Optimizer):