Skip to content

Instantly share code, notes, and snippets.

@jvmncs
Created October 24, 2019 13:11
Show Gist options
  • Save jvmncs/0667aa2a381c4bb7c763f363deb6f6ef to your computer and use it in GitHub Desktop.
Save jvmncs/0667aa2a381c4bb7c763f363deb6f6ef to your computer and use it in GitHub Desktop.
y_ptr = x_ptr + x_ptr
y = tf.reshape(y_ptr, shape=[2, 2])
id = tf.constant([[1., 0.], [0., 1.]]).send(alice)
z = tf.matmul(y, id).get()
print(z)
# ==> tf.Tensor([[2. 4.]
# [6. 8.]], shape=(2, 2), dtype=float32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment