idealo / image-super-resolution

🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
https://idealo.github.io/image-super-resolution/
Apache License 2.0
4.56k stars 755 forks source link

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

Closed ss8319 closed 2 years ago

ss8319 commented 2 years ago

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 commented 2 years ago

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

ss8319 commented 2 years ago

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

Thank you so much! Works for me now