0
点赞
收藏
分享

微信扫一扫

已解决:导入keras(tf)训练好的模型报错解决OSError: Unable to open file (unable to open file: name = ‘model_3.h5’)

ZSACH 2022-03-30 阅读 184

1.场景

导入keras训练好的模型报错解决

OSError: Unable to open file (unable to open file: name = ‘model_3.h5’)

2.解决方法:

  • (1)检查编码格式,检查是否有在文件开头声明UTF-8编码。
  • (2)检查路径是否正确;
  • (3)检查路径是否包含中文,若是有中文,换成英文;
  • (4)重新安装h5py:首先卸载pip uninstall h5py;其次重新安装:pip install h5py==3.2.1
  • (5)如果还不行的话,重启一下编辑软件(比如pycharm);
  • (6)还不行的话私聊我。
举报

相关推荐

0 条评论