Last active
July 11, 2022 11:15
-
-
Save mwitiderrick/3296f35b96fca2aebf9fd978000fb3af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jax.jit | |
def sum_logistic(x): | |
return jnp.sum(1.0 / (1.0 + jnp.exp(-x))) | |
x_small = jnp.arange(6.) | |
derivative_fn = jax.grad(sum_logistic) | |
print(derivative_fn(x_small)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment