Deep Learning With PyTorch - Full Course

  Рет қаралды 766,463

Patrick Loeber

Patrick Loeber

Күн бұрын

Пікірлер: 472
@patloeber
@patloeber 3 жыл бұрын
I hope you enjoy the course :) And check out Tabnine, the FREE AI-powered code completion tool that helps you to code faster: www.tabnine.com/?.com&PythonEngineer * ---------------------------------------------------------------------------------------------------------- * This is a sponsored link. You will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏
@sepgorut2492
@sepgorut2492 3 жыл бұрын
at 37:00 I found after adding 2 that not all members of the tensor had exactly x+2. I tried this several times with always one of the parts of the tensor had less than x+2. Then at 37:16 you also had an anomaly. Why is this?
@ЕвгенийКоваленко-к9з
@ЕвгенийКоваленко-к9з 2 жыл бұрын
Thank you very much. You did a great work!
@Ивангай-б2л
@Ивангай-б2л Жыл бұрын
.👆Never love anyone who treats you like you’re ordinary.
@maranata693
@maranata693 10 ай бұрын
great video! thank you but please don't delete each line that you code! wait till the subject is finished then delete them once
@craigrichards5472
@craigrichards5472 14 күн бұрын
I’m really enjoying it mate. Hope you are doing well. 🎉
@armansa
@armansa 2 жыл бұрын
This is a fantastic tutorial, thank you for sharing this great material! There is one mistake though that needs clarification: ========================================== At 1:12:02 it is mentioned that the code with automatic differentiation does not converge as fast because "back-propagation is not as exact as the numerical gradient". This is incorrect: the reason why the convergence of the two codes are different is because there is a mistake in the gradient() function. When the dot product np.dot(2x, y_pred_y) is performed, the result is a scalar and .mean() does not do anything. Instead of doing .mean(), np.dot(2x, y_pred_y) should simply be divided by len(x) to give the correct mean gradient. After doing this, both methods give the exact same convergence history and final results.
@reedasaeed4493
@reedasaeed4493 2 жыл бұрын
I wishhhh saw your comment earlier. I was just going crazy that what am I doing wrong when calculating manually.
@sebula8001
@sebula8001 2 жыл бұрын
Thanks for this comment, I was a bit concerned when he said that.
@sohamdas
@sohamdas 3 жыл бұрын
This is one of the very few videos which is teaching Pytorch from the ground up! Beautiful work, @Python Engineer. Highly recommend it for any newbie + refresher.
@liorcole7307
@liorcole7307 2 жыл бұрын
This is literally incredible. Perfect mix of theory and actual implementation. I can't thank you enough
@Ивангай-б2л
@Ивангай-б2л Жыл бұрын
.👆Girls dream of chatting with you
@alexcampbell-black8543
@alexcampbell-black8543 2 жыл бұрын
For the feedforward part, you need to send the model to the GPU when instantiating it: model = NeuralNet(input_size, hidden_size, num_classes).to(device) if your device is 'cuda' and you forget the '.to(device)' you will get an error.
@liorcole7307
@liorcole7307 2 жыл бұрын
omg thank you so much for this. saved me hours trying to figure out what was wrong serious life savor
@ozysjahputera7669
@ozysjahputera7669 2 жыл бұрын
I just completed the course on ML from scratch from Python Engineer. It was a great course for someone who learned all those algorithms in the past and wants to see how they get implemented using basic python lib and numpy.
@victorpalacios1747
@victorpalacios1747 3 жыл бұрын
This is probably one of the best tutorials I've ever seen for pytorch. Thank you so much.
@patloeber
@patloeber 3 жыл бұрын
Thanks a lot! Glad you enjoy the course
@shunnie8482
@shunnie8482 3 жыл бұрын
Finally PyTorch doesnt seem as scary as it was before. The best tutorial I could find out there and I understood everything you've said. Thanks a lot.
@patloeber
@patloeber 3 жыл бұрын
glad to hear that :)
@yan-jieli3475
@yan-jieli3475 2 жыл бұрын
On 4:14:00, I think you should use the ground truth as the labels rather than the predicted (line 130). Because the PR curve use the ground truth and predicted score to paint
@emrek1
@emrek1 3 жыл бұрын
Thanks a lot for the low level explanations. At 1:01:47 when you dot product the array turns into a single scalar. So mean() returns that number(the sum), not average. When you fix it you get the exact same results as with pytorch's implementation in 1:12:00
@phi6934
@phi6934 3 жыл бұрын
What is the correct expression of the gradient that gives the same result?
@emrek1
@emrek1 3 жыл бұрын
@@phi6934 I don't remember the details right now, but just dividing the expression with the size of the tensor must do the work. In the expression put smt like .../len(x) instead of .mean()
@phi6934
@phi6934 3 жыл бұрын
@@emrek1 yup that works thanks
@xaiver097zhang8
@xaiver097zhang8 2 жыл бұрын
I found that problem too, Thanks bro!
@spkt1001
@spkt1001 2 жыл бұрын
Thanks for the awesome course! The material is extremely well curated, every minute is pure gold. I particularly liked the fact that for each subject there is a smooth transition from numpy to torch. It's perfect for someone who wants a quick and thorough deeplearning recap and get comfortable with hands-on pytorch coding.
@tanakanaoshi4769
@tanakanaoshi4769 2 жыл бұрын
Basic operations we can do, so x and y equals torch. so let's print x and y. So we do simple addition for example
@kamyararshi6235
@kamyararshi6235 Жыл бұрын
Thanks for the course Patrick! It was a great refresher! BTW, at 3:42:02, in the newer versions instead of pretrained=True it is changed to weights=True.
@genexu520
@genexu520 3 жыл бұрын
Ten-soooor and Inter-ference are the best of the class!
@FaizanAliKhan-me9xj
@FaizanAliKhan-me9xj Жыл бұрын
Dear with apologies kindly notice, At timestamp 1:12:05 make a correction in stating, that the backprop grad was not correct, Actually the numerical one was not correct. Because np.dot is computing a single number and then taking mean is the same number, instead use 2*x/4 in np.dot(2*x,(Y_pred-Y).mean()) to correct your numerical gradient. Using np.dot(2*x/4,(Y_pred-Y)) will produce same result as back propagated result. Mean will be usefull when W and X are matrices. Thank you
@aberry24
@aberry24 2 жыл бұрын
Nice tutorial ! @1:11:40 at line # 37. Instead of using "w -= learning_rate * w.grad" , I used expanded form "w = w - learning_rate * w.grad" and thought it would be same. But in this case 'w.grad' return 'None'. w.require_grad is False and hence error. Though "w -= learning_rate * w.grad" is same as "w.data = w.data - learning_rate * w.grad". It seems torch Tensor ( with require_grad True) have some overridden "__iadd__" implementation.
@Darkspell1947
@Darkspell1947 10 ай бұрын
unsupported operand type(s) for *: 'float' and 'builtin_function_or_method' got this error on that line. any help please
@leo.y.comprendo
@leo.y.comprendo 3 жыл бұрын
When you explained backprop, I felt like I finally saw the light at an endless tunnel
@patloeber
@patloeber 3 жыл бұрын
hehe, happy to hear that!
@li-pingho1441
@li-pingho1441 2 жыл бұрын
The best PyTorch tutorials I've ever watched.
@resoluation345
@resoluation345 10 ай бұрын
This vid quality is ridiculously high, THANK YOU
@皇甫承佑-x5j
@皇甫承佑-x5j 3 жыл бұрын
the most useful video I have ever watched
@patloeber
@patloeber 3 жыл бұрын
happy to hear that!
@sirnate9065
@sirnate9065 Жыл бұрын
Someone has probably mentioned this already, but on line 23 at 1:04:08 .mean() is not doing anything since taking the dot product already returned a scalar. This is just dividing by one. Instead, you should be dividing by len(x) or len(y), or there may be another more efficient way to get the same result.
@johnyou5671
@johnyou5671 8 ай бұрын
Thanks for this incredible resource. FYI I believe the gradient function computed at 1:01:38 is incorrect. I'm pretty sure it should be: def gradient(x, y, y_predicted): return ((y_predicted-y)*2*x).mean()
@Hiyori___
@Hiyori___ 9 ай бұрын
this video was super helpful and clear, I watched everything up until transfer learning, ty so much
@AustinSalgat
@AustinSalgat 3 жыл бұрын
Excellent series. Using this to review what I've learned and to also learn PyTorch, thank you for this. The only thing I'd change is that you add an upward inflection to the end of most of your sentences which is a bit jarring (makes it sound like every sentence is a question).
@patloeber
@patloeber 3 жыл бұрын
Thanks for the tips!
@karthikasaravanakumar316
@karthikasaravanakumar316 Жыл бұрын
you installed it in conda but you are doing the script in another editor?
@uniZite
@uniZite 2 жыл бұрын
Super good tutorial, this really made my day - many thanks !!! In the 05_gradients_torch, the difference in results from 05_gradients_numpy is because the derivative function should return 1/N * np.dot(2*x, y_pred-y) where N = 4. Then the results are exactly equal.
@jeffkirchoff14
@jeffkirchoff14 2 жыл бұрын
Here's the best channel for data science and ML
@charliefinale
@charliefinale Жыл бұрын
Absolutely great. But what was missing for me was how then to use a trained model. Conspicuous in its absence was how at the end to feed data into a trained model and get the answer it was trained to give. Is there another video that explains this?
@TorontoWangii
@TorontoWangii 2 жыл бұрын
Best course on pyTorch tutorial, thanks!
@fatemehmirhakimi
@fatemehmirhakimi 2 ай бұрын
Thankyou Patrick. It was a fantastic tutorial.
@michaelrockinger
@michaelrockinger Жыл бұрын
tabnine is a pain. It took me several attempts to get it uninstalled. it is one of the most intruding packages I ever installed.
@xz1930
@xz1930 Жыл бұрын
Great tutorial on the tensorboard part. But you made a mistake when plotting the precision and recall curve when you append predicted into the labels where it should have been labels1 - the actual labels of the eval batch
@uglybirds6965
@uglybirds6965 2 жыл бұрын
ew, disgusting how good clean and free this course is and underappreciated this is.
@mannyc6649
@mannyc6649 Жыл бұрын
At 1:01:55 you are taking the mean of a scalar, which doesn't do anything. Since you have 4 data points only this effectively means that your learning_rate was multiplied by 4. This is the reason why it seems to work better than PyTorch: this particular case is so well behaved that to speed up is sufficient to take larger steps.
@saikumarreddyyeddula5043
@saikumarreddyyeddula5043 2 жыл бұрын
Wow. This course is awesome. An end to end of everything. I was wondering why I need to learn about Tensorboard and JSON files (other series) for using Torch. This was very useful to me.
@HeadshotComing
@HeadshotComing 2 жыл бұрын
Man this is pure gold, thank you so much!
@keshavraghuwanshi1242
@keshavraghuwanshi1242 Жыл бұрын
Thank you for this amazing tutorial 🙌🙌 , please make a tutorial for GNN multiclass classification model with Pytorch.
@peddivarunkumar
@peddivarunkumar 3 жыл бұрын
Perfect tutorial for a beginner!!!!!!!!
@patloeber
@patloeber 3 жыл бұрын
Glad you think so!
@smooth7041
@smooth7041 6 ай бұрын
Really nice, well explained, well tested, etc.. Thanks a lot!!
@zechenzhang5891
@zechenzhang5891 2 жыл бұрын
Thank you so much, if I got a job by watching this, I want to make a donation.
@austinleedavis
@austinleedavis Жыл бұрын
Note at 2:08: `dataiter.next()` is no throwing an AttributeError: '_MultiProcessingDataLoaderIter' object has no attribute 'next'... I changed that line to `data = next(dataiter)`
@keshavraghuwanshi1242
@keshavraghuwanshi1242 Жыл бұрын
thank you sir for such a great tutorial, please make one tutorial on GNN with PyTorch also.🙌🙌
@bobsmithy3103
@bobsmithy3103 Жыл бұрын
1:42:10 Is there a reason you used `X, y` instead of `X, Y`? I believe it should `Y` as we're dealing with a tensor of dependent variables right? It would be `y` if we were dealing with a scalar though
@devadharshan6328
@devadharshan6328 3 жыл бұрын
Thanks for Ur help I'm able to learn many new things . Keep up this work . Thank you
@patloeber
@patloeber 3 жыл бұрын
Glad to hear that!
@byiringirooscar321
@byiringirooscar321 Жыл бұрын
friend please how can I fix this '_MultiProcessingDataLoaderIter' object has no attribute 'next'
@byiringirooscar321
@byiringirooscar321 Жыл бұрын
got we have to wrap next datatiter = iter(dataloader) data = next(datatiter) features, labels = data print(features, labels)
@insidiousmaximus
@insidiousmaximus 3 жыл бұрын
Great stuff but really frustrating that people do not do object detection tutorials for PyTorch especially for Tensorboard. I have trained a really good object detection system on pytorch for jetson nano however implementing tesnorboard into the trainer it has been difficult to find information on drawing images to tensorboard with original groundtruth image side by side with predicted boxes and labels, so that you have a history on tensorboard throughout the steps to scroll and see how the detection validation set was performing. This is so important when doing large data sets and tens of hours of training! If you can point me in the right direction for this info would be very grateful!
@patloeber
@patloeber 3 жыл бұрын
thanks for the feedback. yes i haven't done object detection yet. but I'm planning to. I also have a jetson nano here :)
@zainkhalid3670
@zainkhalid3670 2 жыл бұрын
Can you make a tutorial on hourglass 104 network? It is a very usable network (recently coming to light) but their is no tutorial available about how to build it.
@AliRashidi97
@AliRashidi97 2 жыл бұрын
best pytorch tutorial ever
@alexandreruedapayen6528
@alexandreruedapayen6528 2 жыл бұрын
That is an excellent course. Thank you Python Engineer
@Pyplane
@Pyplane 3 жыл бұрын
Awesome 💪🔥🚀
@patloeber
@patloeber 3 жыл бұрын
Thanks :)
@hankystyle
@hankystyle 3 жыл бұрын
Thank you for your excellent tutorial! It helps my homework and research a lot!!
@eugenefrancisco8279
@eugenefrancisco8279 2 жыл бұрын
Dude this has general helped me so much. Thank you!
@patloeber
@patloeber 2 жыл бұрын
Glad to hear it!
@yechezkel3621
@yechezkel3621 9 ай бұрын
Given the line X= torch.empty(2,2) Is x an object that has methods and inner data.? (Because we say that empty is a class, and the line of code calls the constractor of class empty?)
@iworeushankaonce
@iworeushankaonce 3 жыл бұрын
Well done, a very smooth intro to PyTorch.
@patloeber
@patloeber 3 жыл бұрын
Glad you like it!
@אורהארבל
@אורהארבל 2 жыл бұрын
such a brilliant course !! I thank you so much !!
@anonymitynone6957
@anonymitynone6957 2 жыл бұрын
@3:02:19,I wonder if it should be "self.l1=nn.Linear(input_size,hidden_size,device=device)",so is the self.l2, for an exception occurs :" expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! "
@retohummer2570
@retohummer2570 2 жыл бұрын
model = NeuralNet(input_size, hidden_size, num_classes).to(device) and then it works
@luosenanthony8344
@luosenanthony8344 3 жыл бұрын
I am big fan of your content, It is just so amazing the way you explain the compliacted things in a simple way!
@patloeber
@patloeber 3 жыл бұрын
thank you so much!
@faatemehch96
@faatemehch96 3 жыл бұрын
Thanks for the best PyTorch Tutorial 👍🏻👍🏻👍🏻
@patloeber
@patloeber 3 жыл бұрын
Glad you like it!
@zainkhalid3670
@zainkhalid3670 2 жыл бұрын
Thanks for the tutorial but you did not explain Transfer Learning Correctly. There was unexplained code which created a lot of confusion.
@archyt88
@archyt88 3 жыл бұрын
Thank you so much for this great and free tutorial, I really appreciate your job, thanks!
@mimomael6381
@mimomael6381 Жыл бұрын
Thank you so much for the amazing tutorial 👍👍👍!
@_simply2say
@_simply2say 2 жыл бұрын
Excellent tutorial, easy to follow and understand
@HuyNguyen-fp7oz
@HuyNguyen-fp7oz 3 жыл бұрын
Great course, as always!
@Mistertiny95
@Mistertiny95 2 жыл бұрын
très bonne vidéo instructive et passionnante.
@2mitable
@2mitable 3 жыл бұрын
fantastic video brother :D have great success
@erictovbin4200
@erictovbin4200 3 жыл бұрын
Ich danke dir vielmals für deine Mühe!
@yashwantraghuwanshi3462
@yashwantraghuwanshi3462 2 жыл бұрын
Thank you so much for your such a kind effort
@Ethan-po8ji
@Ethan-po8ji 2 жыл бұрын
wow, it's really help a lot! Thanks for sharing!
@meyamutha
@meyamutha Жыл бұрын
Really good presentation. Watched and followed hands-on on the side every minute of the 4:35 hr session and this is amazing work.
@za_daleko
@za_daleko 2 жыл бұрын
These nn models doesn't work on cuda coz of only objects from batches are assign to cuda device
@pritesh.tiwari
@pritesh.tiwari 3 жыл бұрын
That's amazing!! Thanks Man
@climanthebiologist7624
@climanthebiologist7624 2 жыл бұрын
Thank you very much! This is so helpful.
@michpo1445
@michpo1445 2 жыл бұрын
at 1:11:20, how does calling l.backward() create the gradients for w (dw). I don't see any functional mapping between w and l in the code
@chyldstudios
@chyldstudios 2 жыл бұрын
A LinkedIn post brought me here ... I'm glad I clicked!
@ashishrahul4692
@ashishrahul4692 2 жыл бұрын
Can someone explain to me where the .forward() method is being called in the Logistic Regression tutorial @1:39:30? I understand how the model was built, and i understand the training process. But I can only see that for forward pass of the training process, we only type model(X_train), this would pass the data to the constructor of the LogisticRegression class, right? So, how is the .forward() method implemented without being called anywhere? Please throw some light on this. Thank you!
@matthewwisdom426
@matthewwisdom426 2 жыл бұрын
It is automatically called by Pytorch when you call model(x). Basically all nn.Module classes have a __call__ magic method that automatically calls the forward method on the arguments when the instance is called
@xinglinli9874
@xinglinli9874 2 жыл бұрын
It seems that all super(NN, self).__init__() can be directly write as super().__init__() in python 3?
@seyeeet8063
@seyeeet8063 3 жыл бұрын
can you make a video on how scatter and gather function works in pytorch?
@eskoo8396
@eskoo8396 2 жыл бұрын
rare tutorial.. thanks
@AbdennacerAyeb
@AbdennacerAyeb 2 жыл бұрын
Really great; well organized and explained. Thank you for the great effort. I appreciate.
@patloeber
@patloeber 2 жыл бұрын
glad you like it!
@tommasyu5136
@tommasyu5136 Жыл бұрын
thankyou! What an amazing courese!
@DZitLee
@DZitLee 2 жыл бұрын
Thank you for the course. It is easy to understand, and you teach Pytorch from the beginning (the structure inside). Thanks a lot
@Micro-kj2db
@Micro-kj2db 11 ай бұрын
Excuse me, can I ask where is the dataset 'data/hymenoptera_data' from? I didn't find it in your Github source files. Thanks a lot!
@andrei-robertalexandrescu5103
@andrei-robertalexandrescu5103 3 жыл бұрын
Thank you for such a great course. I must say I understood a lot of concepts I've worked with, but did not quite grasp.
@patloeber
@patloeber 3 жыл бұрын
Glad you liked it!
@wisdomtent
@wisdomtent 3 жыл бұрын
The course is super excellent
@isaivargas8939
@isaivargas8939 3 жыл бұрын
The best course of Pytorch ever !
@patloeber
@patloeber 3 жыл бұрын
thank you!
@wilsvenleong96
@wilsvenleong96 3 жыл бұрын
I think it would be great to fit in another lecture on optimizers.😀
@patloeber
@patloeber 3 жыл бұрын
great suggestion!
@aliabouelazz4780
@aliabouelazz4780 Жыл бұрын
that gradient definition in 1:03:29 doesn't make any sense along with the use of mean() that has no purpose as the dot product returns a scalar value anyways.
@韩茏桢
@韩茏桢 3 жыл бұрын
Very well explained! The best PyTorch tutorials I've ever watched.
@patloeber
@patloeber 3 жыл бұрын
thanks :) happy to hear that
@haj5776
@haj5776 Жыл бұрын
Crazy good video!
@paulmathew1214
@paulmathew1214 2 жыл бұрын
Great video! One small type error I found,; around 40:00 minutes when using the torch.optim.SGD() the code as presented does not work. Looks like the 'weights' tensor is incompatible. Returns "TypeError: params argument given to the optimizer should be an iterable of Tensors or dicts, but got torch.FloatTensor.". Regardless a great video, very informativce.
@fatih_nar
@fatih_nar 2 жыл бұрын
This is a great tutorial
@ducnguyenhong7672
@ducnguyenhong7672 2 жыл бұрын
Great works. Thank you
@alexeygorbunov6941
@alexeygorbunov6941 3 жыл бұрын
thanks, awsome introduction to Pytorch
@patloeber
@patloeber 3 жыл бұрын
happy to hear that!
@emanuel-tj3ge
@emanuel-tj3ge 2 жыл бұрын
I use pycharm as a code editor, but the file is not loaded. Can anyone help me?
@no_name_1998
@no_name_1998 2 жыл бұрын
This course is awesome ;)
@tomliu8134
@tomliu8134 2 жыл бұрын
Before watching this I am a boy, after that I am a man. Thank you so much!
@elvykamunyokomanunebo1441
@elvykamunyokomanunebo1441 Жыл бұрын
Hi Patrick, Is it possible to pass the feature names into the DataLoaders? How can we extract feature importance from ANNs if we don't know the input feature names?
@mstozdag
@mstozdag 2 жыл бұрын
Question: in the part "06_2_model_loss_and_ optimizer.py" isn't this line supposed to be with X[0] instead of X_test: print(f'Prediction after training: f(5) = {model(X_test).item():.3f}')
@lucastomazini423
@lucastomazini423 3 жыл бұрын
Thank you so much. Excellent tutorial.
@patloeber
@patloeber 3 жыл бұрын
Glad you enjoyed it!
@deepknowledge2505
@deepknowledge2505 2 жыл бұрын
WOW, Comprehensive
@ErhanAbdullah
@ErhanAbdullah 2 жыл бұрын
Thank you for this great tutorial.
@patloeber
@patloeber 2 жыл бұрын
Glad it was helpful!
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 1,1 МЛН
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 70 МЛН
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 3,2 МЛН
How I’d learn ML in 2024 (if I could start over)
7:05
Boris Meinardus
Рет қаралды 1,1 МЛН
Is Computer Science still worth it?
20:08
NeetCodeIO
Рет қаралды 333 М.
Build Your First Pytorch Model In Minutes! [Tutorial + Code]
31:32
AI, Machine Learning, Deep Learning and Generative AI Explained
10:01
IBM Technology
Рет қаралды 257 М.
How I Would Learn Python FAST in 2024 (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 351 М.
All Machine Learning algorithms explained in 17 min
16:30
Infinite Codes
Рет қаралды 87 М.
What is PyTorch? (Machine/Deep Learning)
11:57
IBM Technology
Рет қаралды 30 М.
6 Tips to write BETTER For Loops in Python
9:19
Patrick Loeber
Рет қаралды 249 М.
Run your own AI (but private)
22:13
NetworkChuck
Рет қаралды 1,5 МЛН
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 70 МЛН