Unknown initializer: GlorotUniform when loading Keras model

前端 未结 10 1904
心在旅途
心在旅途 2020-11-29 04:43

I trained my CNN (VGG) through google colab and generated .h5 file. Now problem is, I can predict my output successfully through google colab but when i download that .h5 tr

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 05:15

    Changing

    from keras.models import load_model
    

    to

    from tensorflow.keras.models import load_model
    

    solved my problem!

    To eliminate errors, import all things directly from Keras or TensorFlow. Mixing both of them in same project may result in problems.

提交回复
热议问题