Training Model – Deep Learning and Neural Networks with Python and Pytorch p.4




[ad_1]

In this deep learning with Python and Pytorch tutorial, we’ll be actually training this neural network by learning how to iterate over our data, pass to the model, calculate loss from the result, and then do backpropagation to slowly fit our model to the data.

Text-based tutorials and sample code: https://pythonprogramming.net/training-deep-learning-neural-network-pytorch/

Linode Cloud GPUs $20 credit: https://linode.com/sentdex

Channel membership: https://www.youtube.com/channel/UCfzlCWGWYyIQ0aLC5w48gBQ/join
Discord: https://discord.gg/sentdex
Support the content: https://pythonprogramming.net/support-donate/
Twitter: https://twitter.com/sentdex
Instagram: https://instagram.com/sentdex
Facebook: https://www.facebook.com/pythonprogramming.net/
Twitch: https://www.twitch.tv/sentdex

#pytorch #deeplearning #machinelearning

Source


[ad_2]

Comment List

  • sentdex
    November 19, 2020

    So.. You are testing on your training set, would explain the 97+% accuracy?

  • sentdex
    November 19, 2020

    I've created 2 test files. Jpg 28×28. How do I use this model to test new data? How do i run these images through the network?

  • sentdex
    November 19, 2020

    I recommend using this approach for counting correctly identified samples: correct += torch.sum(torch.argmax(output, dim=1) == y)

  • sentdex
    November 19, 2020

    when I run your code in this episode, I get the following error:

    AttributeError: module 'torch' has no attribute 'no_gard'
    I am using PyTorch 1.6.0 version, installed on 10/23/2020. please advise what to do. I searched the google with no luck. thanks.

  • sentdex
    November 19, 2020

    Where was the 'Forward' method used if anyhwere? We defined it as a method of the class but I can't see it used anywhere

  • sentdex
    November 19, 2020

    nice and clear!

  • sentdex
    November 19, 2020

    Is it the biases automatically considered in each layer or it must be specified? If it is automatically considered, can it be deactivated?

  • sentdex
    November 19, 2020

    So far I find pytorch so much more enjoyable and intuitive to use as a programmer than keras or fastai. I think it's because it still feels like you're algorithmically programming something versus the usual python library that is a convoluted mess of functions.

  • sentdex
    November 19, 2020

    You said CNN's are taking over as opposed to RNN's. Is this true for just image use cases? Or does that include things like Natural Language Processing as well. Like I thought BERT and ULMFIT both uses RNN's ?

  • sentdex
    November 19, 2020

    ploss, lol.

  • sentdex
    November 19, 2020

    Dude, thanks for the class, being honest it took me three days to watch the three videos and I'm spealingspanish so I coudn´t understand the mindest part but I watch other videos and at last I understood almost all, by the way i proved the testset and I get
    Accuracy: 97.1%

  • sentdex
    November 19, 2020

    You can make it train faster by using multiple processes, it's a pain to set up though.

  • sentdex
    November 19, 2020

    This is clearly not a good episode. A lot of missing explanation.

  • sentdex
    November 19, 2020

    Please help me. I am stuck at the "loss = F.nll_loss(output, y)" part.
    Before it, it all runs without an error, but of course, does not learn. After I add it, it produces an error.

    My program is similar to yours but not the same. I am using my own dataset and instead of having 10 outputs, mine only has 2.

    My output variable looks something like: tensor([[-0.8079, -0.5902]], grad_fn=<LogSoftmaxBackward>)
    My y variable looks something like: tensor(0) or tensor(1)

    Any help is appreciated. Thanks and great videos!

  • sentdex
    November 19, 2020

    your tutorial cured my depression

  • sentdex
    November 19, 2020

    This tutorial serie is insane. Thanks a lot

  • sentdex
    November 19, 2020

    I love your spirit of just trying things even without knowing about them completely.

  • sentdex
    November 19, 2020

    if yout output is one hot vector, I think we should use cross entropy loss and not Mean Square error

  • sentdex
    November 19, 2020

    i have 1% accuracy how do i know why ?

  • sentdex
    November 19, 2020

    Thank you very much, man! God bless you! 🙂

  • sentdex
    November 19, 2020

    in the last you should have used testset to check if the prediction is right 🙂 I used it and it seemed to work fine.

  • sentdex
    November 19, 2020

    hey, i got 0.099 accuracy

Write a comment