Skip to content

Instantly share code, notes, and snippets.

@axegon
Created January 25, 2019 14:45
Show Gist options
  • Save axegon/0edb66e69a34537260b66240832670fe to your computer and use it in GitHub Desktop.
Save axegon/0edb66e69a34537260b66240832670fe 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))
@tf.function
def matmul(x, y):
return tf.matmul(x, y)
 
print(matmul(x, y).numpy())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment