I trained a deep model in colab by keras=2.3.1 and tensorflow=2.1.0, I saved my model with JSON and Keras:
saveWeightPath = "/content/drive/My Drive/model_info/model_weights.h5"
saveModelPath = "/content/drive/My Drive/model_info"
model.save_weights(saveWeightPath)
tf.keras.models.save_model(model, saveModelPath)
and my cose for saved json
model_json = model.to_json()
with open("model.json", "w") as json_file:
json_file.write(model_json)
model.save_weights("model.h5")
print("Saved model to disk")
when I want load model in colab I don't have a problem but when I want to load my model in pc local I can't and I get this error: "
- fid = h5f.open(name, flags, fapl=fapl) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5f.pyx", line 88, in h5py.h5f.open OSError: Unable to open file (unable to open file: name = 'C:/Users/Kosar 37638090/Desktop/end pro/model_info', errno = 13, error message = 'Permission denied', flags = 0, o_flags = 0)
"
