Last active
August 31, 2016 17:27
-
-
Save camrongodbout/9b2c4bec649c768401b09bbc07467067 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import tensorflow as tf | |
| # create a constant 2X2 matrix | |
| tensor_1 = tf.constant([[1., 2.], [3.,4]]) | |
| tensor_2 = tf.constant([[5.,6.],[7.,8.]]) | |
| # create a matrix multiplication operation | |
| output_tensor = tf.matmul(tensor_1, tensor_2) | |
| # have to run the graph using a session | |
| sess = tf.Session() | |
| result = sess.run(output_tensor) | |
| print(result) | |
| sess.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
session.close() should be sess.close()