import tensorflow as tf
tf.reset_default_graph() # 利用这个可清空defualt graph以及nodes
with tf.variable_scope(‘Space_a’):
a = tf.constant([1,2,3])
with tf.variable_scope(‘Space_b’):
b = tf.constant([4,5,6])
with tf.variable_scope(‘Space_c’):
c = a + b
d = a + b
with tf.Session()as sess:
print(a)
print(b)
print©
print(d)
print(sess.run©)
作者:hustliu2018
来源:优快云
原文:https://blog.youkuaiyun.com/qq_33039859/article/details/79907879
版权声明:本文为博主原创文章,转载请附上博文链接!