TypeError: Unexpected keyword argument passed to optimizer: learning_rate

前端 未结 13 1643
故里飘歌
故里飘歌 2021-02-13 04:14

I am trying to load a Keras model which was trained on an Azure VM (NC promo). But I am getting the following error.

TypeError: Unexpected keyword argumen

13条回答
  •  鱼传尺愫
    2021-02-13 04:43

    This happened to me too. Most likely because the learning_rate was renamed from version 2.2.* to 2.3.0 in September 2018. (see release notes: https://github.com/keras-team/keras/releases : Rename lr to learning_rate for all optimizers. )

    This worked for me:

    sudo pip install keras --upgrade 
    

提交回复
热议问题