Guest User

Untitled

a guest
Dec 11th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from __future__ import print_function
  2.  
  3. import tensorflow as tf
  4.  
  5. # Create a Constant op that produces a 1x2 matrix. The op is
  6. # added as a node to the default graph.
  7.  
  8. matrix1 = tf.constant([[3., 3.]])
  9.  
  10. # Create another Constant that produces a 2x1 matrix.
  11. matrix2 = tf.constant([[2.],[2.]])
  12.  
  13. product = tf.matmul(matrix1, matrix2)
  14.  
  15. with tf.Session() as sess:
  16. result = sess.run(product)
  17. print(result)
Add Comment
Please, Sign In to add comment