Unknown initializer: GlorotUniform when loading Keras model

前端 未结 10 1880
心在旅途
心在旅途 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:03

    if you are loading the architecture and weights separtly, while loading archtiecture of the model change :

    models.model_from_json(json)
    

    to :

    tf.keras.models.model_from_json(json)
    

    and the problem is solved

提交回复
热议问题