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...

Комментарии • 18

  • @Mutual_Information
    @Mutual_Information 3 года назад +8

    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.

    • @abhishekkrthakur
      @abhishekkrthakur  3 года назад +1

      hope you find it useful :) and don't forget to subscribe ;)

  • @sahhaf1234
    @sahhaf1234 2 года назад

    @1:35 what does it mean "to put the model in train mode?" Are we setting requires_grad=false??

  • @shaelanderchauhan1963
    @shaelanderchauhan1963 3 года назад

    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.

  • @dalchemistt7
    @dalchemistt7 3 года назад

    I was waiting for the 8th video in the series for so long - thought the series is abandoned :(
    Glad it started again :)

  • @GameinTheSkin
    @GameinTheSkin 3 года назад

    Hi Abhishekh, Great work! Just started your book and also found your channel. Good to see you uploading regularly!

  • @ajju3866
    @ajju3866 3 года назад +2

    sir can you make a vedio for custom optimizer in pytorch

    • @abhishekkrthakur
      @abhishekkrthakur  3 года назад

      in this series, i will definitely talk about it.

  • @diegoquintana2249
    @diegoquintana2249 3 года назад

    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.

    • @abhishekkrthakur
      @abhishekkrthakur  3 года назад

      In the video, i just show addition. I do mention that you can average. Going forward we will be using averaging.

    • @lebesgue-integral
      @lebesgue-integral Год назад

      For averaging, would I need to return "total_loss / (batch_index + 1)" in the "train_one_epoch" function rather than only returning "total_loss"?

  • @DanielWeikert
    @DanielWeikert 3 года назад

    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

  • @shekhshehab1672
    @shekhshehab1672 3 года назад

    Hello sir. If anyone want to learn machine learning thoroughly through Coursera courses, which courses you will suggest to him?

    • @robosergTV
      @robosergTV 3 года назад +1

      the Andrew Ng course

  • @aadityasingh4911
    @aadityasingh4911 3 года назад

    I dont see much difference in this from linear regression method

    • @abhishekkrthakur
      @abhishekkrthakur  3 года назад +2

      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.

  • @otmaneamel8642
    @otmaneamel8642 2 года назад

    that's too much code to do simple operations , I prefer using Keras to gain time and energy rather than dealing with boilerplate code