欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

str‘ object has no attribute ‘decode‘解决办法

程序员文章站 2022-07-13 10:51:48
...
File "\tensorflow_core\python\keras\saving\hdf5_format.py", l
lib/python3.6/site-packages/keras/engine/saving.py", line 1004, in load_weights_from_hdf5_group
    original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'

是hdf5包的问题

解决办法

pip install hdf5

pip install h5py -i https://pypi.tuna.tsinghua.edu.cn/simple/

相关标签: tensorflow