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

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/


版权声明:本文为qq_35608277原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。