首页 > 解决方案 > colab 中的 ISR 库不工作,AttributeError: 'str' object has no attribute 'decode'

问题描述

from ISR.models import RDN, RRDN

model = RDN(weights='noise-cancel')

然后它给了我这个错误。我能做些什么?

-------------------------------------------------- ------------------------- AttributeError Traceback (last last call last) in () 5 6 #model = RDN(weights='noise-cancel' ) ----> 7 model = RRDN(weights='gans') # 默认 8 #model = RDN(weights='psnr-small') 9 # model = RDN(weights='psnr-large')

3 帧 /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”对象没有属性“decode”

标签: pythonisr

解决方案


!pip install 'h5py==2.10.0' --force-reinstall
!pip install ISR

推荐阅读