Skip to content

Instantly share code, notes, and snippets.

@arafatkatze
Created July 29, 2016 16:44
Show Gist options
  • Save arafatkatze/d4cf53b05fe3962a6ac5d89003c3d10a to your computer and use it in GitHub Desktop.
Save arafatkatze/d4cf53b05fe3962a6ac5d89003c3d10a to your computer and use it in GitHub Desktop.
import tensorflow as tf
a = tf.Graph()
input1 = tf.placeholder(tf.float32, shape=(2))
input2 = tf.placeholder(tf.float32, shape=(2))
output = tf.mul(input1, input2)
with tf.Session() as sess:
print(sess.run([output], feed_dict={input1:[7,2], input2:[2,4]}))
tf.train.write_graph(sess.graph_def, 'models/', 'test_graph_multi_dim.pb', as_text=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment