This commit is contained in:
Morten Hjorth-Jensen
2023-09-24 22:04:27 +02:00
parent e6b8cab12f
commit bff99c3750
2 changed files with 4877 additions and 2 deletions
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -1,9 +1,10 @@
import jax.numpy as jnp
import jax.nuympy as jnp
from jax import grad, jit, vmap
from jax import random
def sum_logistic(x):
return jnp.sum(1.0 / (1.0 + jnp.exp(-x)))
x_small = jnp.arange(3.)
x_small = arange(3.)
derivative_fn = grad(sum_logistic)
print(derivative_fn(x_small))