Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 523 Bytes
# Import TensorFlow.
import tensorflow as tf
# Operations with variables as graph input flow
a = tf.placeholder(tf.int16)
b = tf.placeholder(tf.int16)
# Apply some operations
add = tf.add(a, b)
mul = tf.multiply(a, b)
# Construct a `Session` to execute the graph.
sess = tf.Session()
# Execute the graph with variable input
print("Addition input variables: %i" %, feed_dict={a: 5, b: 8}))
print("Multiplication input variables: %i" %, feed_dict={a: 5, b: 8}))
# Close the session
You can’t perform that action at this time.