In [15]:
import tensorflow as tf
In [16]:
weight = tf.Variable(0.8)
In [17]:
input_value = tf.constant(1.0)
In [18]:
output_value = weight * input_value
In [22]:
init = tf.global_variables_initializer()
In [20]:
sess = tf.Session()
In [23]:
sess.run(init)
In [24]:
sess.run(output_value)
Out[24]:
In [25]:
x = tf.constant(1.0, name='input')
In [26]:
w = tf.Variable(0.8, name='weight')
In [28]:
y = tf.multiply(w, x, name='output')
In [30]:
summary_writer = tf.summary.FileWriter('log_simple_graph', sess.graph)
In [ ]: