keras “AttributeError: ‘str‘ object has no attribute ‘decode‘ “

网友投稿 296 2022-08-27

keras “AttributeError: ‘str‘ object has no attribute ‘decode‘ “

今天在运行keras代码加载resnet34的预训练模型的时候,出现了下面的错误:

“AttributeError: ‘str‘ object has no attribute ‘decode‘

解决方法

pip install h5py==2.10 -i ➜ B13208 pip install h5py==2.10 -i in indexes: h5py==2.10 Downloading (2.9 MB) |████████████████████████████████| 2.9 MB 673 kB/s Requirement already satisfied: numpy>=1.7 in /home/eric/anaconda3/envs/pointnet/lib/python3.6/site-packages (from h5py==2.10) (1.19.5)Requirement already satisfied: six in /home/eric/anaconda3/envs/pointnet/lib/python3.6/site-packages (from h5py==2.10) (1.15.0)Installing collected packages: h5py Attempting uninstall: h5py Found existing installation: h5py 3.1.0 Uninstalling h5py-3.1.0: Successfully uninstalled h5py-3.1.0Successfully installed h5py-2.10.0

好象是我的h5py的版本不高的原因

参考文献

​​keras保存的h5、hdf5模型,加载时出现“AttributeError: ‘str‘ object has no attribute ‘decode‘ “​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:3亿营销费?全网吹的春风营销到底是什么!
下一篇:paddle OSError: (External) Cuda error(101), invalid device ordinal.
相关文章

 发表评论

暂时没有评论,来抢沙发吧~