Convolutional Neural Networks - Deep Learning basics with Python, TensorFlow and Keras p.3

preview_player
Показать описание
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.

Рекомендации по теме
Комментарии
Автор

As a programmer/amateur data scientist, I have wanted to understand and use neural networks to take my craft to the next level for years, and sentdex, you are the first that has enabled me to actually break that glass ceiling and use neural networks for real-life problems. Thank you so much!

blendamosity
Автор

You can add layer with Activation inside:
model.add(Dense(256, activation='relu'))
It allows you to choose activation function to each of them separately

nikolaiivankin
Автор

You can add the "layers" as an array "model = Sequential ([ flatten(), Dense(10), Activation('relu') ])" instead of using the model.add() function every time.

aaronshed
Автор

you should definitely do a video on transfer learning in this series.

camdenparsons
Автор

15:55 Found the solution: If you did everything exactly the same throughout the previous video, just add this " y = np.array(y) " after the " X = np.array(X).reshape(-1, IMG_SIZE, IMG_SIZE, 1)" so it look like this:
X = np.array(X).reshape(-1, IMG_SIZE, IMG_SIZE, 1)
y = np.array(y)


It was giving me errors until adding that line too and reexecuting it

prohacker
Автор

Hi Harrison, doesn´t the Dense(64) layer at 11:30 need an activation function? I added another "relu" there and got better accuracy.

brotherlui
Автор

For anyone getting the following error "validation_split is only supported for Tensors or NumPy " add y = np.array(y) under X = np.array(X).reshape(-1, IMG_SIZE, IMG_SIZE, 1)

ahmednayeem
Автор

you have some of the strangest coffee cups I have ever seen

waynefilkins
Автор

A tutorial on keras callbacks such as EarlyStopping and ModelCheckpoint would be nice.

Also, I would love if you could explain Image Augmentation in Keras for CNN.

gautamj
Автор

Hi, Sir. i found a problem with:
ValueError Traceback (most recent call last)
in <module>
----> 1 model.fit(X, y, batch_size = 32, epochs=3, validation_split=0.1)

in _method_wrapper(self, *args, **kwargs)

do you have any suggestion to solve this error?

tiarakusumadewi
Автор

It was a headache but I finally installed tensorflow-gpu on my windows pc. now I can run the epoch in 20 seconds!

mason
Автор

X=X/255.0 is giving me error unsupported operand type(s) for /: 'NoneType' and 'float'. How will I rectify the error ?

aniketpatra
Автор

hey sentdex, nice tutorial I've been binge watching your tutorial videos and compared to your previous convolutional neural network videos I noticed a few differences. For conv2D you didn't increase the number of features(for both layers you kept it at 64) whereas previously you increased it. Why is that? Moreover, why did we not use dropout and why did we use the 'sigmoid' activation function over 'softmax'? And also wanted to say thank you for the great content!

bharddwajvemulapalli
Автор

For anyone who had a negative loss by following this tutorial with your own dataset which had more than 2 categories of labels, don't forget to normalize your label array as well!! So y_normalized = y/ y_.max(). it will make your labels to be between 0-1 and then the whole thing works just fine

gangholdon_
Автор

Hi guys,

I tried the tutorial as showed here step by step, but I get this message when I try to run the CNN:

ValueError: Input 0 of layer conv2d is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: (None, 150, 150)

Any suggestion on why?

Thanks!

andreachiarello
Автор

how would i go about running this on the GPU instead of my CPU? it is taking ages to run a singular epoch

RRKS_TF
Автор

Hey sendex, may I ask what kind net structure are you using? CNN has a lot of net structure, like vgg-16, u-net, and etc. Therefore, what's the net structure you are using?

kevintsai
Автор

I am getting an error at validation split ValueError: `validation_split` is only supported for Tensors or NumPy arrays, found: (array([[[[ 36],

sanjanakonda
Автор

Hi, can I know what is the problem with this?

ValueError: logits and labels must have the same shape ((None, 1) vs (None, 100, 100, 1))

I followed your code but got this error at the end.

chanhwasheng
Автор

"I need more tea" cracks me
Thanks for the vid

Osirisdaro