#关于导入模型h5文件时出现的
model = load_model(’./senet.h5’)
AttributeError: ‘str’ object has no attribute 'decode’问题
解决方法:
可能是h5py版本不适配的原因
由于tensorflow2.1.0支持h5py<3.0.0,而在安装tensorflow会自动安装h5py 3.1.0 。
解决方案:
在conda环境运行如下命令
pip install tensorflow h5py == 2.10.0