
Reduction chain-rule hooks (backward / forward, parameter / variable)
Source:R/138_reductions_reduction.R
reduction-chain-rule.RdReduction chain-rule hooks (backward / forward, parameter / variable)
Usage
param_backward(x, param, dparams)
param_forward(x, param, delta)
var_backward(x, var, value)
var_forward(x, var, value)Arguments
- x
A
Reduction.- param
A
Parameterfrom the original problem.- dparams
Named list of param-id -> gradient arrays for the reduced (transformed) parameters.
- delta
Numeric array of perturbations to the original
param.- var
A
Variablefrom the original problem.- value
Numeric array (gradient or delta) attached to
var.