Tensorflow/Keras/h5py报错处理

个人体验记录帖子,如有任何闯入,请与我联系。谢谢。

[En]

Personal experience record post, if there is any intrusion, please contact me. Thank you.

目录

Python/Tensorflow/Keras版本对应

按理说Tensorflow 2.x已经集成了Keras 如果有报错可能需要检查一下版本对应。
关于h5py,Tensorflow2.1 不支持 h5py >= 3.0.0。
请参考我使用的版本:

[En]

Please refer to the version I used:

Python 3.7(conda) + Tensorflow 2.1.0 + Keras 2.3.0 + h5py 2.10.0

Tensorflow/Keras/h5py报错处理

; AttributeError: module ‘h5py’ has no attribute ‘File’

重装h5py库。使用conda环境的话在python命令行里:

pip uninstall h5py

conda install h5py

非conda环境:

pip uninstall h5py

pip install h5py

AttributeError: ‘str’ object has no attribute ‘decode’

model_config = json.loads(model_config.decode(‘utf-8’))AttributeError: ‘str’

解决方法同上。h5py版本对应问题。

===不定期更新

Original: https://blog.csdn.net/AsmallFROG/article/details/123612193
Author: AsmallFROG
Title: Tensorflow/Keras/h5py报错处理

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/496608/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球