My keras model is saved in google storage with model.save(model_name)
I cannot load the model on pydatalab. When I save the model on my local machine, I can just open it with load_model(filepath). Also I did import keras.backend as K, based on NameError when opening Keras model that uses Tensorflow Backend
I have tried the following:
model = load_model(tf.gfile.Open(model_file))
Error: TypeError: expected str, bytes or os.PathLike object, not GFile
load_model('gs://mybucket/model.h5')
Error: IOError: Unable to open file (unable to open file: name = 'gs://mybucket/model.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
with file_io.FileIO(model_file, 'r') as f: modl = load_model(f)
error: TypeError: expected str, bytes or os.PathLike object, not FileIO