导包
#importing the packages
import tensorflow as tf
sess= tf.Session()
创建一个新的图,
import tensorflow as tf
sess= tf.Session()
#Creating a new Graph(not default)
myGraph=tf.Graph()
with myGraph.as_default():
variable=tf.Variable(30,name='navin')
initialize=tf.global_variables_initializer()
#Running computation in session in graph
with tf.Session(graph=myGraph) as sess:
sess.run(initialize)
print(sess.run(variable))