Model Analysis – Deep Learning and Neural Networks with Python and Pytorch p.8
[ad_1]
Welcome to part 8 of the deep learning with Pytorch series. In this tutorial, we’ll be covering how to do analysis of our model, at least at a basic level, along with honing in more on our training loop and code.
Text-based tutorial and sample code: https://pythonprogramming.net/analysis-visualization-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 #python #deeplearning
Source
[ad_2]
A simple way to smooth the accuracy and loss graphs using pandas exp weighted moving avg:
df['train_acc_mva'] = df['train_acc'].ewm(alpha=.02).mean() # exponential weighted moving average
df['test_acc_mva'] = df['test_acc'].ewm(alpha=.02).mean()
df['train_loss_mva'] = df['train_loss'].ewm(alpha=.02).mean()
df['test_loss_mva'] = df['test_loss'].ewm(alpha=.02).mean()
Then plot using pandas:
df.plot(x='batch_ind', y=['train_acc_mva', 'test_acc_mva'], figsize=(8,4))
plt.ylabel("Accuracy")
df.plot(x='batch_ind', y=['train_loss_mva', 'test_loss_mva'], figsize=(8,4))
plt.ylabel("Loss")
Man, please continue this series 🙁
NOTE: the "if i % 10 == 0" is not only true for every 10th step because our batch size is 100, so it's actually true EVERY STEP. That's why it takes so much longer, what we actually intended to avoid. Instead you could say: "if i % 9 == 0" beacause now it will only calculate it every 10th step! (note that range(0, len(train_X), BATCH_SIZE) will output 0, 100, 200 etc for i, so if i = 900 it's the 10th step)
Really great tutorials. So much better than the pytorch docs! Thanks.
ROLL TIDE ROLL didn't know you were a BAMA fan!!
What is the negative time in the plot? We are plotting time vs acc or loss. Why do we get plot for negative time less than 0??
Hello nice job! Would be nice if u continued with this series
94 комментария и ни одного на русском
Will you make more videos about pytioch?
The proposed random is not equally distributed.
The start and end-range will not be used as often as the middle part wich can be selected both by start as well as by the end.
For size 2 on a len of 4, both 0 and 3 are used once while 1 and 2 are used twice.
0 1 2 3:
XX
XX
XX
1,2,2,1
For size 3 and len 5, indexes 0 and 4 are only used once, while 2 is used all 3 times.
0 1 2 3 4:
XXX
XXX
XXX
1,2,3,2,1
Then again I understand that the random was not the main part of the video.
Thanks man.
Does it mean, that if we would train the same model with much bigger data that it would not overfit? Is it possible no mater how long the training takes that a model would not over fit?
Your series is amazing ❤ can you do RNN with text generation in PyTorch?
Yeah you did the same mistake where you update after each example rather than after each batch. In this code, the additional iteration over the batch is actually pointless.
Thanks for the series man! But i think we got one thing missing, how to properly save the model for using it later, or continue with the training after a checkpoint. https://pytorch.org/tutorials/beginner/saving_loading_models.html
Hey, I think a proper way to validate over the test set inside of your training loop is to do this once in a while as you otherwise end up taking the most of your time validating over your test set. Also, I don't think validating over a small fraction of your test set is not really valid. You definitely get wrong numbers as the accuracy for one fraction of the test set may be different to another fraction.
the best series I have ever known for learning pytorch! But it could be better if some code of photographing the feature map could be added. Anyway, give you a thumb!
Bro any idea about stock market chart pattern identification advance thanks
How to show a graph in real-time when the model is still training?
Best series 🙂 Wanna learn more with pytorch. More series needed!! 💕
Can you please make a tutorial on distiller from intel
just finished the whole pytorch playlist !! love it thanks @sentdex keep it up 😉
please make a video about SSD object detection on pytorch
Do you even plan on coming back to do data augmentation for unbalanced datasets or transfer learning?
How did you get the command prompt while in sublime?
Thank you for putting together this series. I really enjoyed watching it. Are you going to do any more video on pytorch?
Since you asked for requests, I will: Would love a video digging more in data preparation,including data augmentation. As you mention in your #5, data preparation can be a really tedious task.. would love to hear more about it 😀
Thanks again.Great job @sentdex
Don't spaghet to leave a like on the video people
Dude what happened to this series?? 🙁
pls continue this series 😀 . i'm waiting for that
Thank for the tutorials. but how do i use this model to other pitcher i took , i'm struggle load the image to this model,it error Expected 4-dimensional input for 4-dimensional weight [32, 1, 5, 5], but got input of size [1, 50, 50] instead
Thanks dude, that was awesome! 🙂