Keras warning

I am trying to use keras to generate CNN, but I keep getting this warning which I don't understand how to fix.

Update your Conv2D

Keras 2 API call: Conv2D(64, (3, 3), activation="relu")

after removing cwd from sys.path.

Can anyone provide any ideas on how to fix this?

+4


source to share


3 answers


As they say, this is not a problem. It still works fine, although they might change it any day and the code won't work.

In Keras 2 it has Convolution2D

been replaced with a Conv2d

along with some parameter changes.



Convolution levels * renamed to Conv *.

Conv2D (10, 3, 3) becomes Conv2D (10, (3, 3))

+3


source


Keras 2 came with some API changes. The old API still works, but will give you a warning that the new API functionality is not using Convolutional * as you see in your code.

Convolution2D

Now Conv2d



You can read about other API changes here https://github.com/fchollet/keras/wiki/Keras-2.0-release-notes

0


source


In keras 2

Convolution2D changes to Conv2d or Conv2D

So use:

from keras.layers import Conv2D instead of **from keras.layers import Convolution2D

classifier.add(Conv2D(32,( 3, 3), input_shape = (64, 64, 3), activation = 'relu')) instead of classifier.add(Conv2D(32,3, 3, input_shape = (64, 64, 3), activation = 'relu'))

      

0


source







All Articles