tf没有这个属性variable_scope出错

tf没有这个属性variable_scope出错,tf没有这个属性variable_scope出错,tf没有这个属性variable_scope出错

你tf是什么对象或者模块?
看看是不是variable_scope写错了或者安装的tf模块版本不对
你把代码和错误截图发一下

解决方法,代码中导入部分写入:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
参考:
https://www.codeleading.com/article/74714209676/

如有帮助,请点采纳。