使用CUDA10.1加上Tensorflow 2.0会出现AttributeError: module 'tensorflow' has no attribute 'ConfigProto'这个问题,这个是由于现在新版本中一些1.0版本的函数被和2.0版本函数区分开的缘故

 

所以,需要将

tf.ConfigProto

修改为

tf.compat.v1.ConfigProto

修改前

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

修改后

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-06-17
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案