I got this error when I tried to modify the learning rate parameter of SGD optimizer in Keras. Did I miss something in my codes or my Keras was not installed properly?
from tensorflow.keras.optimizers import SGD
This works well.
Since Tensorflow 2.0, there is a new API available directly via tensorflow
:
Solution works for tensorflow==2.2.0rc2
, Keras==2.2.4
(on Win10)
Please also note that the version above uses learning_rate
as parameter and no longer lr
.