关于AlreadyExistsError: Another metric with the same name already exists.的解决方案

2023-05-16

这项错误发生在我刚安装完tensorflow,想import keras包的时候发生了如下的错误:

Tensorflow.python.framework.errors_impl.
AlreadyExistsError: Another metric with the same name already exists

经过一番查询问题应该是keras包版本的问题,具体原因我现在还不知道,但是经验证,解决方法如下:
1、卸载已有的keras包,博主目前出错版本是2.7

pip uninstall keras

2、安装指定版本的keras包,我安装的版本是2.6.0

pip install keras==2.6.0

到这里就可以正常import keras包了,结果如下:
在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

关于AlreadyExistsError: Another metric with the same name already exists.的解决方案 的相关文章

随机推荐