tensorflow(tf)keras save h5、hdf5模型,loadmodel现AttributeError: ‘str‘ object has no attribute ‘decode‘
1. 问题说明
keras保存的h5、hdf5模型,在使用load_model和load_weights函数,出现AttributeError: ‘str’ object has no attribute 'decode’问题,之前也使用过这些模型和加载函数,但并没有出现这个错误,找了好久才找到解决方案。
2. 解决办法
貌似是由于h5py模块的版本问题,改用2.10版本
pip install&nbs