AttributeError: module ‘tensorflow.compat.v2‘ has no attribute ‘__internal__‘

在跑注视点预测论文实验的时候报错:

AttributeError: module ‘tensorflow.compat.v2’ has no attribute
internal

在这里插入图片描述
这是因为我跑的这篇论文2016年的,应该使用的是tensflow1.x 版本,所以后面我把tensorflow版本下降了,接着又报了上面的错误,原因如下:
我下载的keras是2.x版本,但是此时的tensorflow是1.x版本,所以要把keras降到1.x版本,

pip install keras==1.2.2

我的tensorflow是gpu的1.16.0版本。
下载好新版本之后,就不报错啦。

猜你喜欢

转载自blog.csdn.net/qq_45257495/article/details/131178087