“Could not interpret optimizer identifier” error in Keras

后端 未结 14 1462
别跟我提以往
别跟我提以往 2021-02-03 19:47

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?

14条回答
  •  醉话见心
    2021-02-03 19:54

    I tried the following and it worked for me:

    from keras import optimizers

    sgd = optimizers.SGD(lr=0.01)

    model.compile(loss='mean_squared_error', optimizer=sgd)

提交回复
热议问题