Training Methods

Learn how you can update the implementation of your mini-batch and training loop to make it more flexible.

Updating mini-batch

The next method we need is to add corresponds to the helper function #2 in the chapter, Rethinking the Training Loop: the mini-batch loop. We need to modify it a bit before incorporating it in our StepByStep class.

Inside the previous function, both the data loader and the step function were arguments. However, this is not the case anymore since we have both of them as attributes: self.train_loader and self.train_step for training; ...

Access this course and 1400+ top-rated courses and projects.