解决AttributeError: module 'tensorflow' has no attribute 'ConfigProto'

使用CUDA10.1加上Tensorflow 2.0会出现AttributeError: module 'tensorflow' has no attribute 'ConfigProto'这个问题,这个是由于现在新版本中一些1.0版本的函数被和2.0版本函数区分开的缘故   所以,需要将 tf.ConfigProto 修改为 tf.compat.v1.ConfigProto 修改前 修改后
相关文章
相关标签/搜索