Failed to load model while model exists in folder, and success to load in IPython

I’ve a model saved in a folder containing save_model.pb and keras.metadata.pb.

In IPython notebook, I could load the model successfully with:

model_path = "/file_path/" model = keras.models.load_model(model_path) 

However, when using the exact same code in python file, it shows error:

SavedModel file does not exist at: /file_path/{saved_model.pbtxt|saved_model.pb}

I’d checked twice to make sure the model file exist in the file_path, and same code works fine in Jupyter notebook.

What might cause this difference?

Thank you for any help!

submitted by /u/Laurence-Lin
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *