pypesto.objective.aesara
Aesara objective
- class pypesto.objective.aesara.AesaraObjective[source]
Bases:
ObjectiveBase
Wrapper around an ObjectiveBase.
Computes the gradient at each evaluation, caching it for later calls. Caching is only enabled after the first time the gradient is asked for and disabled whenever the cached gradient is not used, in order not to increase computation time for derivative-free samplers.
- Parameters:
objective (
ObjectiveBase
) – The pypesto.ObjectiveBase to wrap.aet_x (
TensorVariable
) – Tensor variables that define the variables of aet_funaet_fun (
TensorVariable
) – Aesara function that maps aet_x to the variables of objectivecoeff (
Optional
[float
]) – Multiplicative coefficient for objective
- __init__(objective, aet_x, aet_fun, coeff=1.0, x_names=None)[source]
- Parameters:
objective (ObjectiveBase)
aet_x (TensorVariable)
aet_fun (TensorVariable)
coeff (float | None)
- call_unprocessed(x, sensi_orders, mode, **kwargs)[source]
See ObjectiveBase for more documentation.
Main method to overwrite from the base class. It handles and delegates the actual objective evaluation.