AttributeError: module ‘tensorflow‘ has no attribute ‘name_scope‘
在使用tensorboard的时候遇见这个问题在tensorflow2中是没有这种命名方式的,tf.name_scope()这个函数在tf1中存在。我在编写代码时用的就是tensorflow1 但是还是会报错,这里改正方法是将:import tensorflow as tf改为:import tensorflow.compat.v1 as tf...
·
在使用tensorboard的时候遇见这个问题
在tensorflow2中是没有这种命名方式的,tf.name_scope()这个函数在tf1中存在。
我在编写代码时用的就是tensorflow1 但是还是会报错,这里改正方法是将:
import tensorflow as tf
改为:
import tensorflow.compat.v1 as tf
更多推荐



所有评论(0)