jax.jit() compiles a stateless JAX function into XLA-compiled code, typically making repeated execution considerably faster. section 3.5.3
JIT-compile a dense layer
Wrap the complete stateless function with jax.jit(): dense <- jax$jit(\(inputs, W, b) { jax$nn$relu(jnp$matmul(inputs, W) + b) }). Inputs, weights, and bias remain explicit arguments. section 3.5.3
Use jax.jit() with these constraints:
- Decorate only stateless functions. section 3.5.3
- Return any tensors updated by the function rather than mutating hidden state. section 3.5.3

