brainpy.math.autograd.hessian
brainpy.math.autograd.hessian#
- brainpy.math.autograd.hessian(func, dyn_vars=None, grad_vars=None, argnums=None, holomorphic=False, return_value=False)[source]#
Hessian of
func
as a dense array.- Parameters
func (callable, function) – Function whose Hessian is to be computed. Its arguments at positions specified by
argnums
should be arrays, scalars, or standard Python containers thereof. It should return arrays, scalars, or standard Python containers thereof.dyn_vars (optional, ArrayCollector, sequence of JaxArray) – The dynamical changed variables.
grad_vars (optional, ArrayCollector, sequence of JaxArray) – The variables required to compute their gradients.
argnums (Optional, integer or sequence of integers) – Specifies which positional argument(s) to differentiate with respect to (default
0
).holomorphic (bool) – Indicates whether
fun
is promised to be holomorphic. Default False.return_value (bool) – Whether return the hessian values.