hessian#
- class brainpy.math.hessian(func, grad_vars=None, argnums=None, has_aux=None, holomorphic=False)[source]#
Hessian of
funcas a dense array.- Parameters:
func (
Callable) – Function whose Hessian is to be computed. Its arguments at positions specified byargnumsshould be arrays, scalars, or standard Python containers thereof. It should return arrays, scalars, or standard Python containers thereof.grad_vars (
Union[Variable,Sequence[Variable],Dict[str,Variable],None]) – The variables required to compute their gradients.argnums (
Union[int,Sequence[int],None]) – Specifies which positional argument(s) to differentiate with respect to (default0).holomorphic (
bool) – Indicates whetherfunis promised to be holomorphic. Default False.has_aux (
Optional[bool]) – Indicates whetherfunreturns a pair where the first element is considered the output of the mathematical function to be differentiated and the second element is auxiliary data. Default False.
- Returns:
obj – The transformed object.
- Return type:
ObjectTransform