Skip to content

Instantly share code, notes, and snippets.



Last active Oct 31, 2017
What would you like to do?
# expensive way to compute factorial of n
def factorial(n):
def f(x):
return tf.pow(x, n)
for i in range(n):
f = tfe.gradients_function(f)
return f(1.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment