Skip to content

Instantly share code, notes, and snippets.

@axegon
Created January 25, 2019 14:43
Show Gist options
  • Save axegon/a37e9bbb58e462eafb343783d22a94bd to your computer and use it in GitHub Desktop.
Save axegon/a37e9bbb58e462eafb343783d22a94bd to your computer and use it in GitHub Desktop.
import numpy as np
import tensorflow as tf
 
np.random.seed(42)
 
x = tf.constant(np.random.rand(3,3))
y = tf.constant(np.random.rand(3,3))
result = tf.matmul(x, y)
tf.global_variables_initializer()
with tf.Session() as sess:
result = sess.run(result)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment