I trained a keras model on google colab. Now not able to load it locally on my system.

前端 未结 3 429
梦毁少年i
梦毁少年i 2020-12-20 21:18
with open(\'2model.json\',\'r\') as f:
json = f.read()
model = model_from_json(json)
model.load_weights(\"color_tensorflow_real_mode.h5\")

I traine

3条回答
  •  被撕碎了的回忆
    2020-12-20 21:53

    load the model using

     from tensorflow.keras.models import load_model
    

    instead of

    from keras.models import load_model
    

    I tried using many methods but this is the one that finally worked!

提交回复
热议问题