MJay
Variables and Placeholders 본문
In [1]:
import tensorflow as tf
In [2]:
n1 = tf.constant(1)
In [3]:
n2 = tf.constant(2)
In [4]:
n3 = n1 + n2
In [5]:
with tf.Session() as sess:
result = sess.run(n3)
In [6]:
print (result)
In [7]:
print (tf.get_default_graph())
In [8]:
g = tf.Graph()
In [9]:
print(g)
In [10]:
graph_one = tf.get_default_graph()
In [11]:
print(graph_one)
In [12]:
graph_two = tf.Graph()
In [13]:
print(graph_two)
In [15]:
with graph_two.as_default():
print(graph_two is tf.get_default_graph())
In [16]:
print (graph_two is tf.get_default_graph())
In [ ]:
'Cloud Computing > Tensorflow' 카테고리의 다른 글
Variables and Placeholders (0) | 2019.04.29 |
---|---|
ckpt 관련 유용한 commands (0) | 2019.04.01 |