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

Loading Models | AttributeError: 'str' object has no attribute 'decode' #228

Closed
ss8319 opened this issue Mar 15, 2022 · 2 comments
Closed

Comments

@ss8319
Copy link

ss8319 commented Mar 15, 2022

I am running the ISR Prediction Tutorial.ipynb on Google Colab using the dataset given.

While running the code to create the model as shown below,
model = RRDN(weights='gans')

It is showing this error.
/usr/local/lib/python3.7/dist-packages/tensorflow_core/python/keras/saving/hdf5_format.py in load_weights_from_hdf5_group(f, layers)
649 """
650 if 'keras_version' in f.attrs:
--> 651 original_keras_version = f.attrs['keras_version'].decode('utf8')
652 else:
653 original_keras_version = '1'

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

In the subsequent, hdf5_format.py file I tried taking off '.decode('utf8')' but it gives the same error.

@mrkrcc
Copy link

mrkrcc commented Mar 16, 2022

@ss8319
Copy link
Author

ss8319 commented Mar 17, 2022

https://github.com/idealo/image-super-resolution#weights-loading

Thank you so much! Works for me now

@ss8319 ss8319 closed this as completed Mar 17, 2022
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

2 participants