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

Error while loading saved model #24

Open
tashrifbillah opened this issue Dec 28, 2020 · 2 comments
Open

Error while loading saved model #24

tashrifbillah opened this issue Dec 28, 2020 · 2 comments
Assignees

Comments

@tashrifbillah
Copy link
Contributor

Traceback (most recent call last):
  File "/home/pnlbwh/CNN-Diffusion-MRIBrain-Segmentation/pipeline/dwi_masking.py", line 716, in <module>
    dwi_mask_sagittal = predict_mask(cases_file_s, trained_model_folder, view='sagittal')
  File "/home/pnlbwh/CNN-Diffusion-MRIBrain-Segmentation/pipeline/dwi_masking.py", line 134, in predict_mask
    loaded_model.load_weights(optimal_model)
  File "/home/pnlbwh/miniconda3/envs/pnlpipe3/lib/python3.6/site-packages/keras/engine/network.py", line 1166, in load_weights
    f, self.layers, reshape=reshape)
  File "/home/pnlbwh/miniconda3/envs/pnlpipe3/lib/python3.6/site-packages/keras/engine/saving.py", line 1004, in load_weights_from_hdf5_group
    original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
@tashrifbillah tashrifbillah self-assigned this Dec 28, 2020
@tashrifbillah
Copy link
Contributor Author

Following keras-team/keras#14265

tashrifbillah added a commit to pnlbwh/pnlpipe that referenced this issue Dec 28, 2020
@tashrifbillah
Copy link
Contributor Author

If the issue occurs with an independent install of this package, use - h5py<3 in the conda recipes.

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

No branches or pull requests

1 participant