Skip to content

Instantly share code, notes, and snippets.

@ChunML
Created December 12, 2018 02:45
Show Gist options
  • Save ChunML/7cc481966ab7dbfe4c1a33e297322440 to your computer and use it in GitHub Desktop.
Save ChunML/7cc481966ab7dbfe4c1a33e297322440 to your computer and use it in GitHub Desktop.
image = tf.placeholder(tf.float32, [None, 224, 224, 3])
label = tf.placeholder(tf.int64, [None])
loss, train_op = SomeNetwork(image, label)
with tf.Session() as sess:
processed_image, processed_label = get_data_from_file()
loss, _ = sess.run(
[loss, train_op],
feed_dict={image: processed_image,
label: processed_label})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment