Pytorch Training a Model Part 2
Skills:
Supervised Learning80%
Key Takeaways
Trains a convolutional neural network model using PyTorch
Original Description
Today we wrap up part two of our full convolutional neural network build. We already have the model set up, so now we finish the training loop, try a few optimizers, and add some basic validation checks. We set epochs, loop over batches, move data and the model to the same device, run the forward pass, compute loss, call backward, then optimizer step, and track the loss so we can see it drop.
If you are new here, an epoch just means the model has seen the whole training set once, then it can see it again for a second epoch. We also run validation every so often to check accuracy on data the model is not training on, and we saw it climb from about 5 percent untrained to around the low 80s after training, with a few dips that are normal. TensorBoard is in the tutorial, and even if it is not my favorite, it can help you see loss and accuracy over time.
That is a solid end to end CNN run, and next week we start building real stuff with it.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: Supervised Learning
View skill →Related Reads
📰
📰
📰
📰
Decoding the Link Between Pretraining and Reinforcement Learning
Dev.to · Pneumetron
Learning the Loop — #101 | What Is Machine Learning, Really?
Medium · AI
Learning the Loop — #101 | What Is Machine Learning, Really?
Medium · Deep Learning
The model benchmark is not your production benchmark
Dev.to · hefty
🎓
Tutor Explanation
DeepCamp AI