![]() |
Sleipnir Python API
|
Public Member Functions | |
| None | __init__ (self, Variable variable, Variable wrt) |
| None | __init__ (self, Variable variable, VariableMatrix wrt) |
| VariableMatrix | get (self) |
| scipy.sparse.csc_matrix[float] | value (self) |
This class calculates the Hessian of a variable with respect to a
vector of variables.
The gradient tree is cached so subsequent Hessian calculations are
faster, and the Hessian is only recomputed if the variable expression
is nonlinear.
Template parameter ``Scalar``:
Scalar type.
Template parameter ``UpLo``:
Which part of the Hessian to compute (Lower or Lower | Upper).
Constructs a Hessian object.
Parameter ``variable``:
Variable of which to compute the Hessian.
Parameter ``wrt``:
Variable with respect to which to compute the Hessian.
| None jormungandr.autodiff.Hessian.__init__ | ( | self, | |
| Variable | variable, | ||
| VariableMatrix | wrt | ||
| ) |
| VariableMatrix jormungandr.autodiff.Hessian.get | ( | self | ) |
Returns the Hessian as a VariableMatrix.
This is useful when constructing optimization problems with
derivatives in them.
Returns:
The Hessian as a VariableMatrix.
| scipy.sparse.csc_matrix[float] jormungandr.autodiff.Hessian.value | ( | self | ) |
Evaluates the Hessian at wrt's value.
Returns:
The Hessian at wrt's value.