8. Training and validation loops in PyTorch
HTML-код
- Опубликовано: 27 дек 2024
- In this tutorial, I will show you how to write #Training and #Validation loops in #PyTorch
Please subscribe and like the video to help me keep motivated to make awesome videos like this one. :)
To buy my book, Approaching (Almost) Any Machine Learning problem, please visit: bit.ly/buyaaml
Follow me on:
Twitter: / abhi1thakur
LinkedIn: / abhi1thakur
Kaggle: kaggle.com/abh...
Just discovered this channel. I’m excited to see someone so accomplished on kaggle sharing that knowledge here. Kaggle can be absolute goldmine for data science techniques.
hope you find it useful :) and don't forget to subscribe ;)
@1:35 what does it mean "to put the model in train mode?" Are we setting requires_grad=false??
Happy to see that the Grandmaster channel is growing slowly. The growth of this Channel will be a huge benefit to the data science community.
I was waiting for the 8th video in the series for so long - thought the series is abandoned :(
Glad it started again :)
Hi Abhishekh, Great work! Just started your book and also found your channel. Good to see you uploading regularly!
sir can you make a vedio for custom optimizer in pytorch
in this series, i will definitely talk about it.
Assuming that the losses are using the "mean" reduction, what is the meaning of adding batch losses (total_loss += loss) and not averaging them? I've seen other resources where at the end of the loop, this total_loss is averaged over the number of steps. I've also read that this choice (mean or only sum) only influences the impact of the learning rate in the training since it only scales the learning step differently.
In the video, i just show addition. I do mention that you can average. Going forward we will be using averaging.
For averaging, would I need to return "total_loss / (batch_index + 1)" in the "train_one_epoch" function rather than only returning "total_loss"?
Can you elaborate what we need to be aware of considering the names when we use model(**data)? Really like the way you structure the code.
Thanks
ill explain it in the next video
Hello sir. If anyone want to learn machine learning thoroughly through Coursera courses, which courses you will suggest to him?
the Andrew Ng course
I dont see much difference in this from linear regression method
in the regression video, we did everything in one loop. here we have separated training and validation functions to make the loop cleaner. this way is going to be more useful (and cleaner) moving forward.
that's too much code to do simple operations , I prefer using Keras to gain time and energy rather than dealing with boilerplate code