close
0

Error module 'keras.optimizers' has no attribute 'RMSprop'

avatar
asked 27-08-2022

3 Answers


0

You can do this

from tensorflow import keras
from keras import optimizers
optimizer=keras.optimizers.RMSprop(learning_rate=0.01)
avatar
answered 27-08-2022

0

Try

from keras.optimizers import rmsprop_v2
model.compile(loss='binary_crossentropy', optimizer='rmsprop')
avatar
answered 27-08-2022

0

Use

import tensorflow
from tensorflow.keras import optimizers
optimizer = tensorflow.keras.optimizers.RMSprop(lr=0.0003,decay=1e-6)
avatar
answered 27-08-2022