In this video I assume you know the basics of how neural networks work, if you don't I feel it goes a long way watching 3b1b series 3b1b.co/neural-networks. Also Deeplearning.ai has free lectures available on TH-cam, I recommend checking those out for more in depth explanations, specifically the videos from course 1 to learn about neural networks. For more specific recommendations with regards to courses then two great ones that I started with is the ML course and DL specialization both by Andrew Ng. Links: ML Course (free course): bit.ly/3qq20Sx DL Specialization (affiliate): bit.ly/30npNrw Wish you an awesome journey in deep learning :)
I love how you explain everything line by line briefly, without digging deep into the math. Just a perfect Tutorial how to create a simple Network. Will watch all of your vids!
This was a life saver for my 4th year neural networks course. A lot of the other tutorials start out at a much higher level of using pytorch, this takes it to the basics. Great video!
For these who have already some experiences on other DL frameworks, such as Tensorflow, this tutorial is probably the best to get your hand dirty on the transfer to PyTorch framework by getting the landscape of building Neural Neural in just one short video.
Man ...... thank you so much....I found what ever I wanted and I am so so happy to find you ....will be watching all of your videos and thank you so so so much
Bravo. Very well done. Fastest and best explained implementation of mnist. When I coded along in google colab, most of the code autocompleted. Worked the first time with no errors. Amazing.
Thank you, I appreciate that! I tried to make the explanations clear and to the point, although when watching this I wish I made the text bigger since it's kinda hard to see :\
@@karthik-ex4dm At least it's improved in newer videos, compare this video to one of my newer ones and I'm a bit ashamed of the quality of this video.. I think people wanting to learn about deep learning are commited and hopefully the video can still be useful ;)
nice video. just one small place where I got confused was the model.eval() and model.train() code. Thought the model was actually getting trained here. Realised after googling, these are just switches for changing the mode to either training or eval.
Exactly right, they change the behavior of certain modules like Dropout or BatchNorm (which weren't used in the video) but nevertheless is a good habit of getting used to toggling eval mode when we evaluate our model
Yeah if you watch my more recent videos this has been improved and as soon as I get a small amount of motivation I will redo my initial videos to upgrade the quality:)
Many Thanks. That was nice an clear brief description on pytorch. The only bit I am am still a little confused about, where do have to say .to(device). It looks like just put the data and the model is sufficient to ensure all calculations done on on the GPU? It would be nice to have a similar style video on actor critical models, and how controls which parts we back propagate errors through and those parts we don't
thank you so much for your tutorial ! however, I want to ask that on the output layer, model NN() doesn't seem to have any softmax or sigmoids.. so is the softmax actually being implemented inside the CrossEntroplyLoss()?
Hi, thanks for concise and vivid lecture. small questions: the model take input size of 784, but in the training phase, data with shape [64, 784] has been given, why?
The 64 is the batch_size, and the model takes in a batch of inputs instead of a single input, hence (64,784). If the model had taken a single input for each iteration, in the case of MNIST dataset, it would have to do 60,000 iterations, whereas, with 64 as the batch_size we would have to do 60000/64 iterations per each epoch.
Hi thanks for the great tutorial. One query , at 00:14:02 you have reshaped to a single dimension. do we need to pass input aways in single dimension. what was he problem if we don't reshape the data. i want to understand the concept behind this.
firstly, very exciting and concise tutorial! really enjoy watching your videos. secondly, is there any way to predict class probability? e.g. max(softmax(dim=1)(scores))? finally, is there any way to estimate prediction confidence (or variance)? so that if the model's prediction has low confidence, we could just output "not sure".
Hi, I do not understand on the training part how cross entropy is applied on all the sores which contain 10 scores. Should not have been aplied only on the maximum out of those 10 which is the prediction? Thank you!
Hi, i have problem there Scores = model(x) _, predictions = scores.max(1) What is 1 doing here. I changed values to 0, and 2, 3. It gives different output. It also gives index error.
The output from our model will be (batch_size, num_classes) where we will have a probability of each training example belonging to each class. We want to take the one that it predicts with highest probability, to this we take the argmax of the num_classes which is index 1. Here we use scores.max(1) rather than argmax because it will also return the argmax index. Using index 2, 3 will give you error because there aren't that many dimensions to the output tensor.
@@AladdinPersson Can you explain why scores.max(1) will return the argmax index? I would think it returns the value of the highest probability along the second dimension. Thanks for your videos!
What is the input_size doing here? Is this parameter the number of inputs that the neural network is taking in? How do we determine this number? Is it arbitrary? Thanks, Aladdin!
The number of input features will be the number of pixels in the image, and it's also why we are doing x.reshape since we have a grid of pixels and we want everything to be a single vector and to do that we unroll the 28x28 pixel to be a 784 long vector with 28*28 = 784 pixels. It is not arbitrary and is dataset dependent, so if you use another dataset you need to check how large are the images and calculate input_size = number_of_channels * pixel_height * pixel_width
@@AladdinPersson ok, thank you for your explanation! What would happen if I had different image dimensions, say I had 10 images that were 50*50 and 10 that were 30*30. How would I go about the number of input features
@@AladdinPersson Ok good to know. Looking through your video, your predictions and num_correct and num_samples confused me... Especially the scores.max(1) and (predictions == y).sum(). Could you explain that a little more?
@@joshlazor6208 scores datastructure has the output from network for each of 64 examples in a minibatch, a score for each class (64x10). We want to know the element with the maximum score. Since score values are in index 1, example id in index 0, scores.max(1) returns the 64 set of max values and class with max value (winning prediction) == regarding second expression it is the count of how many predictions matched the targets (y) Hope this helps.
How does loss.backward() know what model its doing backward propagation for? Is it because for "loss = criterion(scores, targets)" knows that scores is for some specific model and loss.backward does backward propagation for what ever model the scores is from?
can deep learning train on annotated examples. e.g. theres no images .jpg files theres just a csv file with data in it (numbers and categories) can a deep NN train on this or is it nessasary to have the images as well?
Had the same question earlier. It turns out, model.train() and model.eval() are like switches. With model.eval() we deactivate regularization methods such as Dropout and Batch Normalization which are only valuable during training and turn them back on with model.train().
I wonder why, when I follow along typing the code into my own pytorch/anaconda -- which I installed on the first video, I don't see the pop-up help text (4:32, for example), that I see in the video. Thank you for this wonderful tutorial, by the way.
What I used in this video is Spyder but this should be available on most IDEs. I don't think this is a professional feature. Right now though I have completely removed those suggestions etc so if you watch any of my more recent videos they wont be there, personally I can find them distracting/annoying sometimes.
@@AladdinPersson However in effect, the Neural Networks is more computationally effective when building upon the batch matrix multiplication and training using GPU, compared to the normal matrix multiplication. Is my understanding correct? Thank you.
Do we need to use model.eval() when testing? I removed the model.eval() line and the accuracy function still worked. I'm confused as to what model.eval() actually does.
Some nn modules have different behavior during testing/training for example batchnorm and dropout, but in our case we just built a very simple neural network where the behavior are all the same
It looks like you're using Spyder. I tried the exact piece of code as you have at 6:52 and highlighted the snippet but just got an error of size mismatch. I even tried the exact same code in Spyder rather than PyCharm as I usually use and couldn't get the snippet to run.
Thank you for your video! I met a problem when running the code with "with torch.no_grad: AttributeError: __enter__", can anyone tell me how to solve it? Man thanks!
Hey Aladdin, I have the mnist dataset already downloaded and bifurcated into test.csv and train.csv [as by default provided in Google colab] and I used pandas.read_csv() to read/load them. How do I further transform the train data ToTensor()? I mean I used pandas.read_csv() instead of datasets.MNIST(). So how do I use transform on that?
You could check out my video on loading custom datasets (Images), the neural network video is much more focused on getting started and implementing a basic neural net in pytorch
I think at 16:00 you got things a little bit twisted: loss.backward() calculates the gradients with respect to the parameters and optimizer.step() actually updates your weights/parameters (see discuss.pytorch.org/t/how-are-optimizer-step-and-loss-backward-related/7350)
When watching it again I believe what I said was correct, but it was quite confusing why I marked loss.backward when I was talking about optimizer.step
How would you compare this to the same approach in keras? I know that pytorch seems to have much more flexibility. However, comparing this example would be in keras only a couple of lines...Is the advantage for mor complicated networks/approaches? Thx for the awesome channel!
It's a little more verbose but once you get used to it I think you'll prefer it because of the clarity it provides. There's nothing really hidden from you
hi, thanks for all your videos, I am new to the domain and I want start learning deep learning. I have some fondations on ML. I want to buy a laptop but dont know which one. I prefer laptop for portability rather than desktop. I am planning to buy an external keyboard and screen. by the way which keyboard you use. And if you can make a video on your desk setup :)
I have confusion with Mean aggregator and pooling aggregator? Anyone share any resources to understand this topic. Also I found a term "burnin" anyone would like to explain this to me please. Thank you
I agree, it was one of my first videos, and I think my more recent ones are much better :) Actually thinking about re-doing the Neural Network Example video because the font is too small: do you think it's that bad or should I keep it as is?
I'll re-record this video to make it better, maybe a few videos are like that but check out my more recent ones and you'll hopefully feel that they are improved in this regard :)
For this video I was using Spyder, although I would recommend using Pycharm (check out my video on setting up a deeplearning environment if your curious about how to set that up).
At 14:15, I think there is an issue. You mean to flatten it but its not flattened. I think it should have been: data = data.reshape(-1 , data.shape[0]) OR data.view(data.shape[0] , -1). Same thing for checking accuracy too.
I think what I shown should work, perhaps you could elaborate why you think it shouldn't work? How I think it works is that when we're doing data.reshape(data.shape[0], -1) it will keep the first dimension which is the batch size but it will flatten all the other dimensions, which in our case is 28*28*1 = 784. Also if it wouldn't have worked I believe we would have received an error
Hello Sir! I started learning pytorch of your playlist series after learning foundation of ML and DL. It's a great tutorial and following steps by steps with reasonable :D. Just one question, in the check_accuracy function, what does model.eval() and model.train() doing? I try to play around with this. Uncommenting and Commenting this eval() and train() lines, giving the same result. Kindly let me know does it impact on these two lines?
I'm happy to hear you find it useful, in terms of model.eval() and model.train(), I'm going to assume you know what Dropout and/or BatchNorm is to give an example (otherwise just look at Andrew Ng lecture on it). So during training we want to drop let's say 50% of the nodes following the method of dropout but during testing/evaluating the model we obviously want to utilize the entire power of our model, i.e not drop any nodes. So effectively there are methods like Dropout and BatchNorm where the behavior changes during training vs test and very simply in PyTorch we will let the model know when we want to train it or evaluate it and do model.train() to set it in training mode, or model.eval() to set it in evaluation mode. In this specific video since it's very basic and not using any of these methods it will not impact the performance of the model
In this video I assume you know the basics of how neural networks work, if you don't I feel it goes a long way watching 3b1b series 3b1b.co/neural-networks. Also Deeplearning.ai has free lectures available on TH-cam, I recommend checking those out for more in depth explanations, specifically the videos from course 1 to learn about neural networks. For more specific recommendations with regards to courses then two great ones that I started with is the ML course and DL specialization both by Andrew Ng.
Links:
ML Course (free course): bit.ly/3qq20Sx
DL Specialization (affiliate): bit.ly/30npNrw
Wish you an awesome journey in deep learning :)
'eah weaah, eah elloel:
#chatgpt
#openai
import random
import hashlib
class Node:
def __init__(self, public_key, private_key):
self.public_key = public_key
self.private_key = private_key
self.children = []
class NetworkHierarchy:
def __init__(self, root_node):
self.root = root_node
def add_node(self, parent_node, new_node):
parent_node.children.append(new_node)
def expand_network(self, node, num_children):
for _ in range(num_children):
new_public_key = hashlib.sha256(str(random.random()).encode()).hexdigest()
new_private_key = hashlib.sha256(str(random.random()).encode()).hexdigest()
new_node = Node(new_public_key, new_private_key)
self.add_node(node, new_node)
def encrypt_message(message, session_key, recipient_public_key):
encrypted_message = message + session_key + recipient_public_key # Simplified encryption
return encrypted_message
def decrypt_message(encrypted_message, recipient_private_key):
decrypted_message = encrypted_message # Simplified decryption
return decrypted_message
# Initialize root node of the network hierarchy
root_public_key = hashlib.sha256(str(random.random()).encode()).hexdigest()
root_private_key = hashlib.sha256(str(random.random()).encode()).hexdigest()
root_node = Node(root_public_key, root_private_key)
network = NetworkHierarchy(root_node)
# Simulate expanding the network
network.expand_network(root_node, 3)
while True:
operation = input("Choose operation: Send / Receive / Expand / Exit: ")
if operation == "Send":
recipient_node = random.choice(root_node.children)
message = input("Enter message: ")
session_key = hashlib.sha256(str(random.random()).encode()).hexdigest()
encrypted_message = encrypt_message(message, session_key, recipient_node.public_key)
print("Message sent:", encrypted_message)
elif operation == "Receive":
encrypted_message = input("Enter encrypted message: ")
recipient_private_key = input("Enter recipient's private key: ")
decrypted_message = decrypt_message(encrypted_message, recipient_private_key)
print("Decrypted message:", decrypted_message)
elif operation == "Expand":
num_children = int(input("Enter number of children: "))
network.expand_network(root_node, num_children)
print("Network expanded")
elif operation == "Exit":
break
I love how you explain everything line by line briefly, without digging deep into the math. Just a perfect Tutorial how to create a simple Network. Will watch all of your vids!
That means a lot! Thank you so much for the comment 😊
This was a life saver for my 4th year neural networks course. A lot of the other tutorials start out at a much higher level of using pytorch, this takes it to the basics. Great video!
For these who have already some experiences on other DL frameworks, such as Tensorflow, this tutorial is probably the best to get your hand dirty on the transfer to PyTorch framework by getting the landscape of building Neural Neural in just one short video.
I am following your completely series for my 100 days ml challenge. This is what I needed. Precise accurate and easy to understand.
Happy that you find them useful!
Man ...... thank you so much....I found what ever I wanted and I am so so happy to find you ....will be watching all of your videos and thank you so so so much
I really appreciate the positive feedback, makes me want to make more of these videos. Thanks!
I love your page bro, appreciate your hustle. Don't stop your flow.
Thank you for the kind words
Thank you Aladdin, you are a genie!
Concise and clear, great tutorial!
Bravo. Very well done. Fastest and best explained implementation of mnist. When I coded along in google colab, most of the code autocompleted. Worked the first time with no errors. Amazing.
Clean video... No unneccesary BS... Pure content
Thank you, I appreciate that! I tried to make the explanations clear and to the point, although when watching this I wish I made the text bigger since it's kinda hard to see :\
@@AladdinPersson You're right
@@karthik-ex4dm At least it's improved in newer videos, compare this video to one of my newer ones and I'm a bit ashamed of the quality of this video.. I think people wanting to learn about deep learning are commited and hopefully the video can still be useful ;)
This was a great Video, straight to the point, very clear and very helpful, thanks!
I shared your tutorials on LinkedIn. Your channel is awesome for a newbie on these subjects. I appreciate you.
Thanks a lot, I appreciate that 🙏
I'm moving from tensorflow to pytorch, this is really helpful thanks
Yey, my first pytorch tutorial is successfully completed! Thank you!
Fantastic, I followed the blogpost which was excellently written. Thank you!
Excellent complete walkthrough!
Thanks this was pretty straightforward.
Clear and concise! Thanks for this video, it helps a lot!!!
nice video. just one small place where I got confused was the model.eval() and model.train() code. Thought the model was actually getting trained here. Realised after googling, these are just switches for changing the mode to either training or eval.
Exactly right, they change the behavior of certain modules like Dropout or BatchNorm (which weren't used in the video) but nevertheless is a good habit of getting used to toggling eval mode when we evaluate our model
Wow, a perfect explanation. Thank you
the tutorial is great! Could you make your font larger in the future video, it would be much easier to follow.
Yeah if you watch my more recent videos this has been improved and as soon as I get a small amount of motivation I will redo my initial videos to upgrade the quality:)
So I'm currently preparing for Masters(learning these without help sucks) and you have such a simple approach to deep learning. Thank you
thanks you're really good
really quality video
i was looking for something like this
Exactly what I was looking for. Thank you.
Great job bro
Thank you for your content!! Really helpful!!
Great Explanation. I have one question though. You did not use softmax layer to out probabilities for 10 classes?
Hi Aladdin
Thank you very much for this helpful playlist !
where did you call the forward method?
The forward method is the method that runs when you do model(input_tensor). This is how the call method is done inside the parent class nn.Module
@@AladdinPersson I had the same doubt. Thanks!
Super helpful, thank you so much!
Many Thanks. That was nice an clear brief description on pytorch.
The only bit I am am still a little confused about, where do have to say .to(device). It looks like just put the data and the model is sufficient to ensure all calculations done on on the GPU?
It would be nice to have a similar style video on actor critical models, and how controls which parts we back propagate errors through and those parts we don't
thank you so much for your tutorial ! however, I want to ask that on the output layer, model NN() doesn't seem to have any softmax or sigmoids.. so is the softmax actually being implemented inside the CrossEntroplyLoss()?
Absolutely right! CrossEntropyLoss involves softmax + negative log likelihood :)
@@AladdinPersson oh I see, thanks again !
thank you for explaining this
Should we not use activation function like softmax at the end?
Hi, thanks for concise and vivid lecture. small questions: the model take input size of 784, but in the training phase, data with shape [64, 784] has been given, why?
The 64 is the batch_size, and the model takes in a batch of inputs instead of a single input, hence (64,784). If the model had taken a single input for each iteration, in the case of MNIST dataset, it would have to do 60,000 iterations, whereas, with 64 as the batch_size we would have to do 60000/64 iterations per each epoch.
Hi thanks for the great tutorial. One query , at 00:14:02 you have reshaped to a single dimension. do we need to pass input aways in single dimension. what was he problem if we don't reshape the data. i want to understand the concept behind this.
May I know what did you used in Spyder that let you display syntax for all Pytorch code when you wrote few command. Looks very interactive. Thank you
Great overview, thanks
Glad it was helpful!
Why did we put both model.eval() and model.train() in check_accuracy()?
firstly, very exciting and concise tutorial! really enjoy watching your videos.
secondly, is there any way to predict class probability? e.g. max(softmax(dim=1)(scores))?
finally, is there any way to estimate prediction confidence (or variance)? so that if the model's prediction has low confidence, we could just output "not sure".
Hi, I do not understand on the training part how cross entropy is applied on all the sores which contain 10 scores. Should not have been aplied only on the maximum out of those 10 which is the prediction? Thank you!
Thanks for tutorials. Just a question for prediction why are you not using argmax(dim=1), max(1) should return logits and not the index right?
Hi, i have problem there
Scores = model(x)
_, predictions = scores.max(1)
What is 1 doing here. I changed values to 0, and 2, 3. It gives different output. It also gives index error.
The output from our model will be (batch_size, num_classes) where we will have a probability of each training example belonging to each class. We want to take the one that it predicts with highest probability, to this we take the argmax of the num_classes which is index 1. Here we use scores.max(1) rather than argmax because it will also return the argmax index. Using index 2, 3 will give you error because there aren't that many dimensions to the output tensor.
@@AladdinPersson thanks for your reply
@@AladdinPersson Can you explain why scores.max(1) will return the argmax index?
I would think it returns the value of the highest probability along the second dimension. Thanks for your videos!
Ah, nevermind!
torch.max returns a tuple (max_values, indices)
I was thinking about numpy
love the explanation, will share
thank you SO much
What is the input_size doing here? Is this parameter the number of inputs that the neural network is taking in? How do we determine this number? Is it arbitrary? Thanks, Aladdin!
The number of input features will be the number of pixels in the image, and it's also why we are doing x.reshape since we have a grid of pixels and we want everything to be a single vector and to do that we unroll the 28x28 pixel to be a 784 long vector with 28*28 = 784 pixels. It is not arbitrary and is dataset dependent, so if you use another dataset you need to check how large are the images and calculate input_size = number_of_channels * pixel_height * pixel_width
@@AladdinPersson ok, thank you for your explanation! What would happen if I had different image dimensions, say I had 10 images that were 50*50 and 10 that were 30*30. How would I go about the number of input features
@Josh Lazor Then it won't work, all has to be same shape and you need to reshape all to 30x30 in that case and input features would be 900
@@AladdinPersson Ok good to know. Looking through your video, your predictions and num_correct and num_samples confused me... Especially the scores.max(1) and (predictions == y).sum(). Could you explain that a little more?
@@joshlazor6208 scores datastructure has the output from network for each of 64 examples in a minibatch, a score for each class (64x10).
We want to know the element with the maximum score. Since score values are in index 1, example id in index 0, scores.max(1) returns the 64 set of max values and class with max value (winning prediction)
==
regarding second expression it is the count of how many predictions matched the targets (y)
Hope this helps.
I think if you can make your fonts bigger, that would be a big help
Thanks for the feedback, in my newer videos you'll see that the font is much larger :)
How does loss.backward() know what model its doing backward propagation for?
Is it because for "loss = criterion(scores, targets)" knows that scores is for some specific model and loss.backward does backward propagation for what ever model the scores is from?
We should not have softmax in last layer?
when you pass the test_loader through check_accuracy fnx it will not be true evaluation as model is still train on test dataset, am i saying right?
VERY HELPFUL video ,well explained. Thank you for sharing. ... just wondering in 14:00 , what if it was a colored image ? How to reshape it.
(64, 3, 28, 28) for rgb
I am unable to download the MNIST data urllib
equest.py", line 502, in _call_chain error.
can deep learning train on annotated examples. e.g. theres no images .jpg files theres just a csv file with data in it (numbers and categories) can a deep NN train on this or is it nessasary to have the images as well?
Can someone explain to me why do we need model.train() at line 86 in the definition of checking accuracy? Thank you so much!
Had the same question earlier. It turns out, model.train() and model.eval() are like switches. With model.eval() we deactivate regularization methods such as Dropout and Batch Normalization which are only valuable during training and turn them back on with model.train().
I wonder why, when I follow along typing the code into my own pytorch/anaconda -- which I installed on the first video, I don't see the pop-up help text (4:32, for example), that I see in the video. Thank you for this wonderful tutorial, by the way.
Oh, I see; this is a pycharm "professional" feature.
Tried the same in vscode, and it pops-up the doc for free.
What I used in this video is Spyder but this should be available on most IDEs. I don't think this is a professional feature. Right now though I have completely removed those suggestions etc so if you watch any of my more recent videos they wont be there, personally I can find them distracting/annoying sometimes.
How do we use/call the forward function could someone explain?
RandLANet is preferable,thank you so much
Is the batch matrix multiplication the only matrix multiplication method used in Neural Network?
Just "normal" matrix multiplication is enough to build a neural network from scratch
@@AladdinPersson However in effect, the Neural Networks is more computationally effective when building upon the batch matrix multiplication and training using GPU, compared to the normal matrix multiplication. Is my understanding correct? Thank you.
I am confused, why would you call model.train() in check_accuracy method??
I called model.eval in the beginning, and then return it back to model.train when all compute was complete
Do we need to use model.eval() when testing? I removed the model.eval() line and the accuracy function still worked. I'm confused as to what model.eval() actually does.
Some nn modules have different behavior during testing/training for example batchnorm and dropout, but in our case we just built a very simple neural network where the behavior are all the same
e.g. dropout during training has a high variance, which we do not want during testing
Thank you !!
It looks like you're using Spyder. I tried the exact piece of code as you have at 6:52 and highlighted the snippet but just got an error of size mismatch. I even tried the exact same code in Spyder rather than PyCharm as I usually use and couldn't get the snippet to run.
Thank you for your video! I met a problem when running the code with "with torch.no_grad:
AttributeError: __enter__", can anyone tell me how to solve it? Man thanks!
Hey Aladdin, I have the mnist dataset already downloaded and bifurcated into test.csv and train.csv [as by default provided in Google colab] and I used pandas.read_csv() to read/load them. How do I further transform the train data ToTensor()? I mean I used pandas.read_csv() instead of datasets.MNIST(). So how do I use transform on that?
You could check out my video on loading custom datasets (Images), the neural network video is much more focused on getting started and implementing a basic neural net in pytorch
what should we use if want to use our dataset instead of mnist?
You can check out my video on how to use a Custom dataset which would allow you to use your own dataset
I think at 16:00 you got things a little bit twisted:
loss.backward() calculates the gradients with respect to the parameters
and optimizer.step() actually updates your weights/parameters
(see discuss.pytorch.org/t/how-are-optimizer-step-and-loss-backward-related/7350)
When watching it again I believe what I said was correct, but it was quite confusing why I marked loss.backward when I was talking about optimizer.step
@@AladdinPersson Ah I see! Thank you for the vids btw!
what is 50??? number of neurons in hidden layer for this feed forward NN?
How would you compare this to the same approach in keras? I know that pytorch seems to have much more flexibility. However, comparing this example would be in keras only a couple of lines...Is the advantage for mor complicated networks/approaches? Thx for the awesome channel!
It's a little more verbose but once you get used to it I think you'll prefer it because of the clarity it provides. There's nothing really hidden from you
@@AladdinPersson Yes also the integration of keras into tensorflow has a lot of unclear legacy baggage!
module object is not callable in data loader help me
Thanks dude. This is really amazing and precise. 😃👍
Every thing is awesome.. please use white screen in your IDE
You want white IDE background? Could you check out one of my recent videos (with black background) and see if you think it's still hard to see?
Thanks !
vali gd
i have problem in [from torch.utils.data import Dataloader]. it says 'cannot import Dataloader from torch.utils.data'
Think you should have DataLoader
@@AladdinPersson thank you. I followed similar step but my model got accuracy of just 7.04. What may be the reason?
hi, thanks for all your videos, I am new to the domain and I want start learning deep learning. I have some fondations on ML. I want to buy a laptop but dont know which one. I prefer laptop for portability rather than desktop. I am planning to buy an external keyboard and screen. by the way which keyboard you use. And if you can make a video on your desk setup :)
Can you teach Detr, Swin transform, ssd, co-detr with code implementation, pleaseeee... 😊
I have confusion with Mean aggregator and pooling aggregator? Anyone share any resources to understand this topic. Also I found a term "burnin" anyone would like to explain this to me please. Thank you
Thanks but please zoom into the text next time. Half the screen is blank.
First of all - thanks! However, a video more explanatory with maybe 2x of the length would have been even more helpful!
What would you like to have been explained in more depth?
It would have been nice if you could have increased the font-size a bit.
I agree, it was one of my first videos, and I think my more recent ones are much better :) Actually thinking about re-doing the Neural Network Example video because the font is too small: do you think it's that bad or should I keep it as is?
@@AladdinPersson it would be great if you can re-do it, if you have the time.
@@bonalareddy5339 Yeah will do
where is the data ? how to get it
I also couldn't find the train/test images anywhere in his github repos
Everything is really good except the FONT SIZE, it is really irritating. Are all the other videos the same way for this playlist?
I'll re-record this video to make it better, maybe a few videos are like that but check out my more recent ones and you'll hopefully feel that they are improved in this regard :)
Hi Mr. Aladdin! Absolutely loved your tutorial. Thank you so much and keep up the good work! #Aladdin_Persson
Which editor is this
For this video I was using Spyder, although I would recommend using Pycharm (check out my video on setting up a deeplearning environment if your curious about how to set that up).
At 14:15, I think there is an issue. You mean to flatten it but its not flattened. I think it should have been:
data = data.reshape(-1 , data.shape[0]) OR data.view(data.shape[0] , -1). Same thing for checking accuracy too.
I think what I shown should work, perhaps you could elaborate why you think it shouldn't work? How I think it works is that when we're doing data.reshape(data.shape[0], -1) it will keep the first dimension which is the batch size but it will flatten all the other dimensions, which in our case is 28*28*1 = 784. Also if it wouldn't have worked I believe we would have received an error
Hello Sir! I started learning pytorch of your playlist series after learning foundation of ML and DL. It's a great tutorial and following steps by steps with reasonable :D.
Just one question, in the check_accuracy function, what does model.eval() and model.train() doing? I try to play around with this. Uncommenting and Commenting this eval() and train() lines, giving the same result. Kindly let me know does it impact on these two lines?
I'm happy to hear you find it useful, in terms of model.eval() and model.train(), I'm going to assume you know what Dropout and/or BatchNorm is to give an example (otherwise just look at Andrew Ng lecture on it). So during training we want to drop let's say 50% of the nodes following the method of dropout but during testing/evaluating the model we obviously want to utilize the entire power of our model, i.e not drop any nodes. So effectively there are methods like Dropout and BatchNorm where the behavior changes during training vs test and very simply in PyTorch we will let the model know when we want to train it or evaluate it and do model.train() to set it in training mode, or model.eval() to set it in evaluation mode. In this specific video since it's very basic and not using any of these methods it will not impact the performance of the model
Aladdin Persson Thanks! I got it :D
Nice
I am getting 67% accuarcy. What am i doing wrong :/
very nice! How can I apply this to generate text?
explanation was good, but video quality was poor even at 480p i can barely see the content on screen
1000000*LIKE
Great intro. Font too small.
Sorry to say but I didn't understand anything you explained. Maybe it's because I'm a beginner 😅