sentdex
Welcome to a tutorial where we’ll be discussing Convolutional Neural Networks (Convnets and CNNs), using one to classify dogs and cats with the dataset we built in the previous tutorial.
Text tutorials and sample code: https://pythonprogramming.net/convolutional-neural-network-deep-learning-python-tensorflow-keras/
Discord: https://discord.gg/sentdex
Support the content: https://pythonprogramming.net/support-donate/
Twitter: https://twitter.com/sentdex
Facebook: https://www.facebook.com/pythonprogramming.net/
Twitch: https://www.twitch.tv/sentdex
G+: https://plus.google.com/+sentdex
Source
can you use this method to make Alzheimer's detection using MRI or if possible use Faster RCNN?
I don't understand my error and why you don't have it. I have got this one : "unsupported operand type(s) for /: 'list' and 'float'" be cause of "X = X/255.0" but I don't found a solution if someone got one. But your tutorial is very good and helpful. Thank you
………model.fit(X, y, batch_size=32, epochs=3, validation_split=0.3)
after execution
AppDataLocalTemp/ipykernel_2228/1932123811.py in <module>
43 )
44
—> 45 model.fit(X, y,
46 batch_size=32,
47 epochs=3,
~anaconda3libsite-packageskerasutilstraceback_utils.py in error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.__traceback__)
—> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb
~anaconda3libsite-packageskerasenginedata_adapter.py in train_validation_split(arrays, validation_split)
1478 unsplitable = [type(t) for t in flat_arrays if not _can_split(t)]
1479 if unsplitable:
-> 1480 raise ValueError(
1481 "`validation_split` is only supported for Tensors or NumPy "
1482 "arrays, found following types in the input: {}".format(unsplitable))
ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found following types in the input: [<class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'int'>, <c……etc
WHAT CAN I DO SIR PLS HELP ME
Can you please explain the science of wisely choosing the critical/essential arguments in various layers, i.e., how to select the number of filters, kernel_size etc., in a CON2D layer? Similarly, whats the science behind adding layers upon layers? I would be grateful if something could be added other than the usual answer of 'more layers in deep learning help in extracting hidden features/patterns'. Please share a link to your video if you have already done it.
To the broader audience, please share a video that you may have found very informative about choosing the parameters for various layers? And how to transition from layer to layer?
How to measure sensitivity and specifity?
Any advice on how to pass the computations from cpu to gpu ( model training) ? I can't find the right combination of tensorflow-gpu, cudnn and cudatoolkit. I tried many things but didn't work and I need some basic guidance , a right mind approach.
Thank You, Good explanation 👍🔥
Just amazing! You are really helping me with my paper! 🙌
Can anyone help me with CNN code that takes NDVI data as input and gives class label as output !?
what to do when i get this error
Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (None, 1)
while compiling the model when i use Conv2D the first time
You are a amazing teacher ❤️
Good day! I just have some inquiries regarding about the error I've got , it says " ValueError: `logits` and `labels` must have the same shape, received ((None, 1) vs (None, 50, 50, 1))", though I have followed all the code and still got this error, thanks.
Hello, I encounter a problem with this code. When I execute the code, I got the error "could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found." Therefore, I went to check whether my CUDA files correspond to my Tensorflow. However, I found that the version of CUDA was 11.6, which is not compatible to any current version of Tensorflow now. What should I do to solve this problem? Thank you.
Please how can I load a .raw dataset for CNN
my y values = 1,1,1,1……. 🤔 can i get some help please how to index this data properly
Are these results normal? it took 4min (approx.) for each epoch i have intel i7-10th gen cpu
Epoch 1/3
546/546 [==============================] – 229s 418ms/step – loss: 0.6330 – accuracy: 0.6417 – val_loss: 0.5930 – val_accuracy: 0.6887
Epoch 2/3
546/546 [==============================] – 239s 437ms/step – loss: 0.5550 – accuracy: 0.7162 – val_loss: 0.5284 – val_accuracy: 0.7382
Epoch 3/3
546/546 [==============================] – 243s 444ms/step – loss: 0.5080 – accuracy: 0.7515 – val_loss: 0.5797 – val_accuracy: 0.7050
——————————————————–
worst video ever!!! "Just kiddiong…" 🙂 5:55
sentdex when are you gonna update this course ?
very strange mug 🙂
Hi can you help me in cnn-traffic-sign-identification.ipynb
import tensorflow as tf
###Doesnt work for some reason…..object differences due to update?->from tensorflow.python.keras.datasets import cifar10
###Doesnt work for some reason…..object differences due to update?->from tensorflow.python.keras.preprocessing.image import ImageDataGenerator
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Dense, Dropout, Activation, Flatten
from tensorflow.python.keras.layers import Conv2D, MaxPooling2D
HOW TO MAKE NOW PREDICTION?
Once u train Ur code for epoch = 5 and i décidé to train it for epochs=10 then will you like restart everything like schufling again thé images and everything then start a brand New epochs=10 or will you juste continue with same order of images and the first epochs 5 u will liké just add 10 now its liké u did 15 epoches
I am getting valueError: logits and labels must have the same shape, received ((32, 1) vs (32, 50, 50, 1))
I'm a little lost here. How does the engine know how to label an image as a dog or a cat. How does it know to get the labels the right way around? I can't see where you tell the engine. "hey this image is a dog"
I followed what you did and for some reason I only train through 702 images, why is that?
Edit: changed batch size to 1 and it worked
13:28 actually I tried it and categorical_crossentropy will not work. the accuracy will only be around .5 during 3 epochs. Only after using binary_crossentropy the accuracy slowly increased. I don't know why
Edit: I guess binary_crossentropy would be more fitting anyways as we only have two classes (cats 'n dogs), but I don't understand why categorical_crossentropy won't work
I'm doing image clasification for traffic signals which has more than 50000 images, but i keep recieving not enough memory to allocate, 115GIB error, can anyone help?
tea cups game strong
how to improve the accuracy?, what is the logic if changing filter sizes,adding more layers, more dense layers to improve accuracy
I have two problems in tensorflow 2:
I fixed the following two problems:
1. y = np.array(y) # this convert the array y into nnumpy arry for model.fit() error.
2. My Video RAM in GPU can be not enough. I turn off GPU mode in Tensorflow 2.
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
then, it runs.
Hello 🙂 Do you have published ypur code of the CNN on GitHub?
Hey bro, when will finish the expination of your book ??
Hellow, I couldn't import Maxpooling2D from 'tensorflow.keras.layers' as shown in an error. Could you please tell what to do. Thanks a bunch.
File "D:PhD ThesisPython2024Test0015_CNN.py", line 6, in <module>
X=pickle.load(open("X.pickle","rb"))
PermissionError: [Errno 13] Permission denied: 'X.pickle' When I run the program it give this error please what I have to do to correct it?
I get 99% accuracy on the training data but I'm stuck at 70% on the validation data. hmmm
better explained
i am getting an error AttributeError: module 'tensorflow.python.distribute.input_lib' has no attribute 'DistributedDatasetInterface'. Did you mean: 'DistributedDatasetSpec'?
in model.fit(X, y, batch_size=32, epochs=3, validation_split=0.3)
"I need more tea"
X.shape = (24946, 50, 50, 1)
len(y)=24946
However, training loop is iterating 702 times only. Please explain.
chat gpt recommended this video to learn.
Is it just me or does the script in the notebook look blurry?
you are a godsend
Have you done any video on how to train a model with MATLAB?
Uses jupyter notebook, proceeds to write the whole code in one cell…….
😂😂😂