fchollet / deep-learning-with-python-notebooks

Jupyter notebooks for the code samples of the book "Deep Learning with Python"
MIT License
18.61k stars 8.63k forks source link

optimizers.RMSprop #168

Closed Raghav-Bell closed 3 years ago

Raghav-Bell commented 3 years ago

I am trying some codes from your fantastic book, but got unconventional error . Please give an eye on it . Thank you model.compile(optimizer=optimizers.RMSprop(learning_rate=0.001), loss='binary_crossentropy' , metrics=['accuracy']) (on p-73) Error : module 'keras.optimizers' has no attribute 'RMSprop'

JonMetcalfe commented 3 years ago

While I'm unsure about the entire story behind it, I think this comes from tensorflow acquiring keras?

Try replacing all imports that look like: from keras import _________ to from tensorflow.keras import _________

This resolved the issue for me!

Raghav-Bell commented 3 years ago

Thanks