Skip to content
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

The pretrained model doesn't load #48

Open
bakirillov opened this issue Oct 15, 2021 · 0 comments
Open

The pretrained model doesn't load #48

bakirillov opened this issue Oct 15, 2021 · 0 comments

Comments

@bakirillov
Copy link

bakirillov commented Oct 15, 2021

Greetings.
I have the following error when I try to load the "resnet_1d_angels.h5" that is given in the repository:

model = load_model("resnet_1d_angles.h5", custom_objects={'custom_mse_mae': custom_mse_mae})


AttributeError Traceback (most recent call last)
in
----> 1 model = load_model(
2 "./MiniFold/models/angles/resnet_1d_angles.h5",
3 custom_objects={'custom_mse_mae': angles.custom_mse_mae}
4 )

~/anaconda3/envs/lapki/lib/python3.8/site-packages/keras/engine/saving.py in load_model(filepath, custom_objects, compile)
417 f = h5dict(filepath, 'r')
418 try:
--> 419 model = _deserialize_model(f, custom_objects, compile)
420 finally:
421 if opened_new_file:

~/anaconda3/envs/lapki/lib/python3.8/site-packages/keras/engine/saving.py in _deserialize_model(f, custom_objects, compile)
222 if model_config is None:
223 raise ValueError('No model found in config.')
--> 224 model_config = json.loads(model_config.decode('utf-8'))
225 model = model_from_config(model_config, custom_objects=custom_objects)
226 model_weights_group = f['model_weights']

AttributeError: 'str' object has no attribute 'decode'

Could you please look into that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant