Last active
January 4, 2017 06:28
-
-
Save arafatkatze/e461c8b0d2f0043213741c27eaecc02f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import tensorflow as tf | |
FLAGS = None | |
a = tf.constant([[2, 3],[4,1]]) | |
b = tf.constant([[5, 6],[1,3]]) | |
d = tf.constant([[0, 4],[9,8]]) | |
with tf.Session() as sess: | |
c = sess.run(a+b) | |
print("a+b = c\n",c) | |
# a+b = c | |
# [[7 9] | |
# [5 4]] | |
e = sess.run(c*d) | |
print ("c*d = e\n",e) | |
# c*d = e | |
# [[ 0 36] | |
# [45 32]] | |
train_writer = tf.summary.FileWriter('/tmp/example',sess.graph) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment