In [9]:
%matplotlib inline
import matplotlib.pyplot as plt
import tensorflow as tf
print(tf.__version__)
In [10]:
a = tf.constant(1)
print(a)
In [11]:
with tf.Session() as sess:
print(a.eval())
In [12]:
x = tf.constant(35, name="x")
y = tf.Variable(x + 10, name="y")
In [13]:
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
print(sess.run(y))
In [14]:
x2 = tf.linspace(-1.0, 1.0, 10)
In [15]:
print(x2)
In [19]:
with tf.Session() as sess:
res = sess.run(x2)
print(res)
In [20]:
#get_default_graph() -> 잘 모르겠음
g = tf.get_default_graph()
print([op.name for op in g.get_operations()])
In [ ]:
In [ ]: