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

前端 未结 3 414
梦毁少年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:51

    I had similar error (Unknown layer:name) when I was trying to locally load model trained on Colab. I was trying to change keras version, tensorflow version, conda version etc. and nothing helped. I solved this by saving my model's weights on Colab, locally creating the same model and loading the weights to this model.

提交回复
热议问题