Load Data and Train Neural Network Model - Deep Learning with PyTorch 6

  Рет қаралды 29,588

Codemy.com

Codemy.com

Күн бұрын

In this video we'll import the iris dataset and Train our Model!
We'll import the iris dataset as a CSV file, and then tweak the last column a bit.
Then we'll set up a Train/Test/Split and start to train the model using SKLearn and Pytorch.
#pytorch #codemy #JohnElder
Timecodes
0:00​​ - Introduction
0:51 - Import Matplot and Pandas
1:35 - Import our Iris Data
3:02 - Check DataFrame
3:31 - Change Last Column To Numbers
4:51 - Set X and y
5:51 - Convert X and y to Numpy Arrays
6:22 - Import SciKitLearn
6:45 - Train Test Split
8:14 - Convert To Tensors
9:56 - Set Criterion and Optimizer
13:38 - Train Our Model
16:28 - Keep Track of Losses
17:18 - Print Epochs and Losses
18:00 - Back Propagation
19:16 - Run The Training!
19:56 - Graph The Losses
21:55 - Conclusion

Пікірлер: 44
@Codemycom
@Codemycom 11 ай бұрын
▶ Watch Deep Learning With Pytorch Playlist ✅ Subscribe To My KZbin Channel: bit.ly/40BcQa8 bit.ly/2IGzvOR ▶ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take 50% off with coupon code: youtube50 bit.ly/2VC9WUN ▶ Get The Code bit.ly/3n5K2J9
@xflory26x
@xflory26x Ай бұрын
Really love your series - I would really appreciate it if you can go through what the backpropation functions do: optimizer.zero_grad() loss.backward() optimizer.step()
@user-bl2ve7fw9s
@user-bl2ve7fw9s 8 ай бұрын
Awesome tutorial, it's great to see that you are using sklearn for data partitioning, thanks for the tutorial! Keep up the good work👍
@Codemycom
@Codemycom 8 ай бұрын
Thanks
@truelove-tr7mg
@truelove-tr7mg Ай бұрын
This saved my life. Thank you!
@Codemycom
@Codemycom Ай бұрын
Welcome
@user-bu9ct1fj8b
@user-bu9ct1fj8b 4 ай бұрын
Hi John. Great video and really clear explanation. Just one question, is there a better way of classifying the flower types. It seems like doing it numerically with all types on the same scale is a bit strange and could lead to some confusion for less accurate models. For example, the machine might give a score of 1.1 because it is unsure whether a flower is Setosa (0.0) or Virginica (2.0). However, a score of 1.1 would lead us to conclude that it is most likely Versicolor. Is there a way to avoid this? I hope I'm being clear.
@bhimbam254
@bhimbam254 4 ай бұрын
torch.FloatTensor(x) not converting x to torch tensor but creating a torch tensor x dimension!!! . Not sure if I am missing anything?
@shahrizal0715
@shahrizal0715 7 күн бұрын
Amazing learning with your videos and then i got deep dive learning.. anjaay
@Codemycom
@Codemycom 7 күн бұрын
Glad you enjoyed it!
@shahrizal0715
@shahrizal0715 7 күн бұрын
@@Codemycom can't wait your next videos...
@Codemycom
@Codemycom 7 күн бұрын
@@shahrizal0715 The completed and final list of all the pytorch videos is in the pinned comment. There won't be any more.
@SierraWater
@SierraWater 11 ай бұрын
I Love you!
@Codemycom
@Codemycom 11 ай бұрын
Thanks!
@pipi_delina
@pipi_delina 11 ай бұрын
John you are the best... Wish you will do llm and bert
@Codemycom
@Codemycom 11 ай бұрын
I'm planning on it
@kombatbakpen6820
@kombatbakpen6820 3 ай бұрын
Thank you so much. However, I have a problem with my Colab; I am not able to visualize the epochs like you did around the timestamp 19 minutes and 30 seconds. How do I set up my Colab like that?
@kombatbakpen6820
@kombatbakpen6820 3 ай бұрын
I figured it out professor! thank you . Can you do a playlist list on computer vision with openCV?😇
@Codemycom
@Codemycom 3 ай бұрын
Sorry, no plans for that.
@skroyeducation2166
@skroyeducation2166 11 ай бұрын
Sir, I have covered full playlist of kivy and it is really amazing, but when we make the kivy program we can only excess it on system which contains the compiler but what if I want to share it or want to convert it into apk can we do it. Please make one more amazing videos and solve this problem, I have already tried Google cllab but file get crashed again and again.
@sinclairarmour1905
@sinclairarmour1905 4 ай бұрын
I've been typing your code into my PC to try but it's a slow process. Can I get a text file with your code anywhere?
@Codemycom
@Codemycom 4 ай бұрын
Code is always in the pinned comment
@tracysmith2914
@tracysmith2914 2 ай бұрын
​@@Codemycom Where in the pinned comment... I am not finding any code anywhere in that 1st pinned comment. Not finding any code in any of your vids... I am probably missing something obvious
@alphabeta644
@alphabeta644 Ай бұрын
@@tracysmith2914 Look for line that says " Get The Code" in the pinned comment.
@lorenminiuk2435
@lorenminiuk2435 7 ай бұрын
Really impressive 😧 .. Very nice tutorial but i return to Django soon 🤕
@Codemycom
@Codemycom 7 ай бұрын
ha
@filipozoz6988
@filipozoz6988 7 ай бұрын
hi guys i just started playing with neural networks and i have a little problem with this tutorial and no matter what i do my losses and epochs graph is stationary on one value. PLS help
@tobiasschulze-heinrichs3187
@tobiasschulze-heinrichs3187 6 ай бұрын
Can you share your code? One thing I could think of is that you run the training itself multiple times - that is something you shouldn't do as the model already learned some weights and biases. You are basically overfitting the model. Run the whole notebook instead
@MattVibes
@MattVibes 4 ай бұрын
For me this was because I had a type on class forward: ``` def forward(self, x): x = F.relu(self.fc1(x)) x = F.relu(self.fc2(x)) x = self.out(x) # remove the ReLU activation here return x```
@essentialedm937
@essentialedm937 4 ай бұрын
Thank you, that fixed mine@@MattVibes
@mdbayazid6837
@mdbayazid6837 6 ай бұрын
Do you have any github repo for this tutorial?
@Codemycom
@Codemycom 6 ай бұрын
Yep, pinned comment as always
@madhiemwicaksana1024
@madhiemwicaksana1024 4 ай бұрын
i just got this error can you please fix it ? RuntimeError: expected scalar type Long but found Float the part that show an error is the convert is part when we convert array to FloatTensor. i did check everything and not found a fix ?
@prashantpandey2299
@prashantpandey2299 2 күн бұрын
i also had same error , but then i did exactly copied from him , just for learning purpose , and it worked
@lorenminiuk2435
@lorenminiuk2435 7 ай бұрын
Freaky 🥵
@Codemycom
@Codemycom 7 ай бұрын
lol
@tracysmith2914
@tracysmith2914 2 ай бұрын
Where is the text of your code in the pinned comment? I am not finding any code anywhere in that 1st pinned comment. Not finding any code in any of your vids... I am probably missing something obvious... the tutorial is fantastic...
@Codemycom
@Codemycom 2 ай бұрын
The code is a link in the pinned comment. It's a link to the code that you click on.
@tracysmith2914
@tracysmith2914 2 ай бұрын
@@Codemycomok... I had not clicked "Read more"... the link for code then did show up... thanks!
@Codemycom
@Codemycom 2 ай бұрын
@@tracysmith2914 Ah, glad you got it sorted out!
@iKostanCom
@iKostanCom 9 ай бұрын
Hi. This one is a little bit too heavy. It would be better to split it into 2 short videos. Great tutorials overall. Thanks
@Codemycom
@Codemycom 9 ай бұрын
Or you can watch it twice
@skroyeducation2166
@skroyeducation2166 11 ай бұрын
Hello sir please
Evaluate Test Data Set On Network - Deep Learning with PyTorch 7
11:32
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 3,1 МЛН
Can you beat this impossible game?
00:13
LOL
Рет қаралды 49 МЛН
Заметили?
00:11
Double Bubble
Рет қаралды 3 МЛН
What is PyTorch? (Machine/Deep Learning)
11:57
IBM Technology
Рет қаралды 20 М.
But what is a neural network? | Chapter 1, Deep learning
18:40
3Blue1Brown
Рет қаралды 16 МЛН
The Most Important Algorithm in Machine Learning
40:08
Artem Kirsanov
Рет қаралды 237 М.
PyTorch Crash Course - Getting Started with Deep Learning
49:55
AssemblyAI
Рет қаралды 79 М.
Training Your Own AI Model Is Not As Hard As You (Probably) Think
10:24
Steve (Builder.io)
Рет қаралды 411 М.
Building a Neural Network with PyTorch in 15 Minutes | Coding Challenge
20:34
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 3,1 МЛН