Very interesting and insightful tutorial. Thanks Andreas!
@zyankarim544
Жыл бұрын
very cool video. I had a question about this particular line of code "np.diagonal(np.take(y_pred_errors, y_true_errors, axis=1))". It seems like the np.take function is doing a lot of unnecessary sampling. Is there a way around this so we don't even bother with np.diagonal? edit: For anyone interested, I think this is a little better true_probability_errors = y_pred_errors[np.arange(len(y_true_errors)), y_true_errors]
@megabyte_ga
4 жыл бұрын
Andreas, thanks for a good job! Very helpful!
@SpaceLime
4 жыл бұрын
Great introduction man!
@packirisamykaran6986
4 жыл бұрын
Hi can you make more projects with deep learning, this really helping me to learn
@AndreasZinonos
4 жыл бұрын
Thank you, will try depending on how many views these get :)
@StunMuffin
Ай бұрын
about 10:04 Whoever use Keras: from keras.utils import to_categorical y_train = to_categorical(y_train, num_classes) y_test = to_categorical(y_test, num_classes) Whoever use tensorflow.keras: from tensorflow.keras.utils import to_categorical y_train = to_categorical(y_train, num_classes) y_test = to_categorical(y_test, num_classes)
@mariolira9279
3 жыл бұрын
Thanks for the video, keep creating, please!
@Okoth254
7 ай бұрын
boolean index did not match indexed array along dimension 0; dimension is 60000 but corresponding boolean dimension is 10000, this is the error I get if I try to display the samples
@fobembe
2 жыл бұрын
Great job Andreas
@hongyeshao1852
2 жыл бұрын
hello author.I am doing with the same thing in evaluate and inference stage.But it shows ValueError: Input 0 of layer "sequential_9" is incompatible with the layer: expected shape=(None, 784), found shape=(None, 4704)
@khachlu5506
8 ай бұрын
Which tools and libraries do you use to code
@AndreasZinonos
8 ай бұрын
Depends on what you want to do, but for deep learning PyTorch is my favourite. Also see Keras, TensorFlow. For general machine learning some good ones are numpy, matplotlib, pandas, sklearn.
@khachlu5506
8 ай бұрын
@@AndreasZinonos thanks
@andreansihombing6780
2 жыл бұрын
When you fit the model, you run 60000 data, but in my program it's 118 data for each epochs, am i doing it wrong ?
@AndreasZinonos
2 жыл бұрын
That’s probably the batch size, otherwise yeah there might be something wrong.
@andreansihombing6780
2 жыл бұрын
@@AndreasZinonos But, it's working, nothing wrong in other step.
@AndreasZinonos
2 жыл бұрын
@@andreansihombing6780 try using my code and see if you get different outputs
@acronym6589
9 ай бұрын
Hi, i got the same issue. Setting the batch_size = 1, fixed it for me.
@aryansuvarna4923
Жыл бұрын
hey is there any particular reason for choosing ur units to be 128? Im new to neural networks and I dont understand how to decide how many neurons we should have in our hidden layers. please let me know
@AndreasZinonos
Жыл бұрын
It’s always trial and error, but these are numbers that were found to work well for such an experiment. Also the numbers are usually powers of 2.
I have a question please. I don’t understand how output layer gives the highest probability for handwritten 0 at its 0th neuron, handwritten 4 at its 4th neuron and etc.
@AndreasZinonos
3 жыл бұрын
Let's say you have 3 classes for simplicity, the digits 0, 1, 2. The output vector will be a vector of size 3, that contains the probability for the input image to be each of those classes/digits. For example if you give an image of a 2, your output vector could be something like: [0.03, 0.07, 0.99]. You can see the highest probability is for class/digit 2, since this is the digit 2, so our classifier performs correctly. Also note that all probabilities should sum to 1 (basic probability theory) minus numerical errors.
@vaheyepremyan6379
3 жыл бұрын
@@AndreasZinonos thank you very much for the answer. I think I understand it now but I still don’t get how is it that for class/digit 2 the 3rd neuron’s output(the 0.99 one) is the highest?
@AndreasZinonos
3 жыл бұрын
@@vaheyepremyan6379 well if you compare the 3 values, 0.99 is bigger than both 0.03 and 0.07, so it’s the largest value.
@日日知非
3 жыл бұрын
good job man
@Styl_Ch
3 жыл бұрын
Η εντολη model.fit(x=x_train, y=y_train, batch_size=batch_size, epochs=epochs) μου βγαζει error :in wrapper(*args, **kwargs) 971 except Exception as e: # pylint:disable=broad-except 972 if hasattr(e, "ag_error_metadata"): --> 973 raise e.ag_error_metadata.to_exception(e) 974 else: 975 raise στο func_graph.py γνωριζεις πως μπορω να το διορθωσω;
@AndreasZinonos
3 жыл бұрын
Den ime sigouros, pithanon kati na pezei me ta variables pu kaneis pass sto function? Tha synistousa na katevaseis to notebook pu ekana upload sto github ke na to sigkrineis me to code su, einai ligo dyskolo na ktlvw ti pezei apo to comment mono :)
@hervelabrie-durand4574
3 жыл бұрын
Whenever I try using x_train or y_train, it says they are not defined
@AndreasZinonos
3 жыл бұрын
Make sure you have defined them above and have run the cell where they were defined. I would restart the kernel of the notebook and carefully run each cell to see where the problem is.
@hervelabrie-durand4574
3 жыл бұрын
@@AndreasZinonos restarting my computer did the trick for some reason! Thanks for the reply, great tutorial btw
@AndreasZinonos
3 жыл бұрын
@@hervelabrie-durand4574 Good to hear! Thank you; please subscribe to support the channel :)
@hervelabrie-durand4574
3 жыл бұрын
@@AndreasZinonos sure thing! I have another question, when I try to train the model I get : “ValueError: Shapes (None, 10, 10) and (None, 10 are incompatible” Yet I literally copied your code from GitHub. Any idea why?
@AndreasZinonos
3 жыл бұрын
@@hervelabrie-durand4574 hmm that means the input data shape and the first layer of the network or any 2 consecutive layers of the network have different sizes, you probably missed something small. If you run the original notebook I have on GitHub does it do that?
@dhruvrachakonda6873
2 жыл бұрын
Just finished learning multivariable calculus and I'm ready to rock and roll :)
@shehzad2519
3 ай бұрын
how do i test using photos?
@khoitaquang7351
3 жыл бұрын
sorry but I don't know the line x_train[y_train== i][0], what does the zero mean?
@AndreasZinonos
3 жыл бұрын
[0] means take the first element. In most programming languages the indices of a list/array start from 0.
@khoitaquang7351
3 жыл бұрын
@@AndreasZinonos yah I know but I think x_train has 3 dimensions and we want to get the matrix which has the label i but x_train[i][0] seem to be a first array of the matrix i. Is it true, sorry but I'm just a newbie :((
@AndreasZinonos
3 жыл бұрын
@@khoitaquang7351 So if we break it down: X_train: has three dimensions X_train[y_train == i] means select from the 3-dim matrix X_Train, where the y_train label is equal to i. y_train and X_train have the same number of elements, X_train has the image matrices while y_train has only the labels. So if i = 2, if we did: X_train[y_train == 2], this line of code would first select all y_train samples with label 2 and then select the corresponding images in the X_train array, which are basically 2d arrays. Adding the [0], so we have X_train[y_train== 2][0], this would simply return the first element/image/2d matrix where the label is 2. We replace 2 with i since we are doing this in a loop. The best way to see this yourself is if you run piece by piece every command in the notebook and see what output you get.
@khoitaquang7351
3 жыл бұрын
Yah thank you very much I've been stuck in it for hour 😅
@Key101
Жыл бұрын
very helpful
@arsalansayed827
3 жыл бұрын
i tried with same model but took a number that i drew in paint. it always predicts 8
@AndreasZinonos
3 жыл бұрын
Good that you’re trying to experiment! The problem here is most likely that the test sample you are using (the one from paint), is from a very different distribution than the data you used to train on. For example if all the training data has a black background like MNIST, but your test sample has a white background (from Paint), the model will fail to make an accurate prediction.
@worldzodiac8378
2 жыл бұрын
i have a question ...can u please please ...tell me...if the model has already been train then do we have to train it again ,when do the train weight are stored ? ...and how much time it takes
@AndreasZinonos
2 жыл бұрын
If you don’t save the weights you lose them and you have to train again. You can save the model (look at the keras docs) and load it later, so you don’t need to train again in that case.
@worldzodiac8378
2 жыл бұрын
@@AndreasZinonos oh... thank u so much !! i was about to lose it since i have been working on it and i got confuse ..
@worldzodiac8378
2 жыл бұрын
@@AndreasZinonos can u tell me for handwritten calculator project ...mnist dataset won't work .since it has only number but not operators right?so can i use mnist for numbers and other dataset for operator ...is it possible to do it?
@AndreasZinonos
2 жыл бұрын
@@worldzodiac8378 so generally your test set needs to be as similar to the training set as possible. The least similar it is, the more difference you will have in your error rates. As you said, you would need to have operators in your training set for it to understand them in the test set, otherwise it would not have seen them before. I wouldn’t suggest combining datasets though. You need to find a dataset that has all of them or make your own.
@worldzodiac8378
2 жыл бұрын
@@AndreasZinonos oh i get about the error rates it get but can u tell me, is it possible to train same model first with mints dataset and then other dataset and stored in json file or not?
Пікірлер: 57