From the course: Computer Vision for Data Scientists

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Training the model

Training the model

- [Instructor] Before we see how to train a model in SuperGradients, I just want to refresh you on the PyTorch training loop. So recall that the PyTorch training loop, you start by passing data through the model for some number of epochs, you have to put the model into training mode. Then you do a forward pass on the data, then you calculate the loss, then you zero out the gradients, then perform back propagation and then update the parameters. And as you'll see in a future video, if you want to do things like batch accumulation, it adds additional lines of code. Not to mention with this basic bare bones training loop, we're not even printing out metrics to the log, or able to monitor our training progress. It's a very bare bones PyTorch training loop but you can see it gets cumbersome. Now let's see how we do this in SuperGradients. Once we've instantiated the trainer, all we need to do is go trainer.train, pass…

Contents