Unknown initializer: GlorotUniform when loading Keras model

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

    I fixed the problem:

    Before:

    from keras.models import load_model
    classifierLoad = load_model('model/modeltest.h5')
    

    Works for me

    import tensorflow as tf 
    classifierLoad = tf.keras.models.load_model('model/modeltest.h5')
    

提交回复
热议问题