Skip to content

The pretrained model doesn't load #48

@bakirillov

Description

@bakirillov

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions