Skip to content

Instantly share code, notes, and snippets.

@lxuechen
Created August 3, 2018 20:39
Show Gist options
  • Save lxuechen/bf2eee0bb1f94c65907d6a6e0828ee79 to your computer and use it in GitHub Desktop.
Save lxuechen/bf2eee0bb1f94c65907d6a6e0828ee79 to your computer and use it in GitHub Desktop.
defun vs autograph
def tensor_square(x, stop_when): # x is scalar Tensor
cnt = 0
while x < stop_when:
x = tf.square(x)
cnt += 1
return cnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment