-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saved Model does not exist #8
Comments
problem: installing the lib places the model in here: (hacky) fix:
import os
from pathlib import Path
def load_model():
parent = Path(os.path.abspath(__file__)).parent
path = os.path.join(parent, 'assets', 'model.h5')
return keras.models.load_model(
path, custom_objects={"my_accuracy": my_accuracy}
) no pull request because there might be some better solution than this (i hope), i did never distribute files via libraries. |
The fix by @tmechen without moving the model: import os
from pathlib import Path
def load_model():
parent = Path(os.path.abspath(__file__)).parents[2]
path = os.path.join(parent, 'assets', 'model.h5')
return keras.models.load_model(
path, custom_objects={"my_accuracy": my_accuracy}
) |
This problem still exists in the compiled versions of the library installed via pip. |
I am receiving following error message, it looks like the model used to solve the captchas does not exist in
assets/model.h5
directory:OSError: SavedModel file does not exist at: assets/model.h5/{saved_model.pbtxt|saved_model.pb}
Here's my code:
The text was updated successfully, but these errors were encountered: