Sleipnir Python API
|
Public Member Functions | |
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.
None jormungandr.autodiff.Hessian.__init__ | ( | self, | |
Variable | variable, | ||
VariableMatrix | wrt | ||
) |
Constructs a Hessian object. Parameter ``variable``: Variable of which to compute the Hessian. Parameter ``wrt``: Vector of variables with respect to which to compute the Hessian.
VariableMatrix jormungandr.autodiff.Hessian.get | ( | self | ) |
Returns the Hessian as a VariableMatrix. This is useful when constructing optimization problems with derivatives in them.
scipy.sparse.csc_matrix[float] jormungandr.autodiff.Hessian.value | ( | self | ) |
Evaluates the Hessian at wrt's value.