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

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

▶ Watch Deep Learning With Pytorch Playlist ✅ Subscribe To My YouTube Channel:
▶ See More At: ✅ Join My Facebook Group:
▶ Get The Code

Codemycom
Автор

Awesome tutorial, it's great to see that you are using sklearn for data partitioning, thanks for the tutorial! Keep up the good work👍

blvefws
Автор

Thanks for the video!!!really helpful to lot of learners

PhaniKompella-qsxi
Автор

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()

xfloryx
Автор

torch.FloatTensor(x) not converting x to torch tensor but creating a torch tensor x dimension!!! . Not sure if I am missing anything?

bhimbam
Автор

Amazing learning with your videos and then i got deep dive learning.. anjaay

shahrizal
Автор

John you are the best... Wish you will do llm and bert

pipi_delina
Автор

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.

skroyeducation
Автор

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?

kombatbakpen
Автор

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.

buctfjb
Автор

13:13 When I run this code, I get something else. I am not sure where or what my error is.


Return an iterator over module parameters.

This is typically passed to an optimizer.

Args:
recurse (bool): if True, then yields parameters of this module
and all submodules. Otherwise, yields only parameters that
are direct members of this module.

Yields:
Parameter: module parameter

Example::

>>> # xdoctest: +SKIP("undefined vars")
>>> for param in model.parameters():
>>> print(type(param), param.size())
<class 'torch.Tensor'> (20L, )
<class 'torch.Tensor'> (20L, 1L, 5L, 5L)

winnietv
Автор

Now I have another issue with the model.parameters that is on the tutorial is not showing the fc1, fc2, and out. How do I fix that?

amandajason
Автор

Really impressive 😧 .. Very nice tutorial but i return to Django soon 🤕

lorenminiuk
Автор

Do you have any github repo for this tutorial?

mdbayazid
Автор

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?

sinclairarmour
Автор

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

filipozoz
Автор

y_train = torch.LongTensor(y_train) is not coverting and is giving me an error am I doing something wrong?

amandajason
Автор

19:15 we had the same error. I caught it early haha

winnietv
Автор

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 ?

madhiemwicaksana
Автор

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

tracysmith