python - 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”
解决方案
我有同样的问题,我在github上找到了解决方案
安装
h5py==2.10.0
以与ISR
库兼容
!pip install 'h5py==2.10.0' --force-reinstall
!pip install ISR
推荐阅读
- javascript - POST https://localhost:44351/Common/SearchAvailableTechList 500(内部服务器错误)
- javascript - 根据来自多个数组的值显示/过滤元素
- kotlin - 如何使用 spyk
- java - 添加json内部对象
- node.js - 如何使用nodejs socket.io检查输入文本框或选项卡是否集中
- r - 使用 na_if 插入 NA 代替 R 中的某个值
- ruby-on-rails - 如何为 select_tag 注册 onblur 挂钩?
- java - 对数组中的数字重新排序
- python - 不再支持 Pandas 通过 loc 在多索引数据框中插入行
- cassandra - 如何选择我的 Cassandra 密钥以进行正确的默认排序?