Fixes #8, adding both a forward frule and a reverse rrule for ChebPoly evaluation.
Note that for the rrule, we don't yet support propagating derivatives through to changes in the ChebPoly object itself. It seems like this would involve allocating huge Tangent objects for something that is rarely needed, so I marked it as @notimplemented instead. (@gaurav-arya, do you know a way to do this only when it is desired?)
Nor do we yet have rules for differentiating the ChebPoly constructor functions (e.g. if you want to compute sensitivity of the polynomial outputs to the data used to construct the polynomial). In principle, this should be straightforward since the polynomial construction is linear in the data.
Oh, it looks like if we want to support backpropagation through the polynomial coefficients then we should use a "thunk" tangent to defer computation to the time when it is actually needed.
Fixes #8, adding both a forward
frule
and a reverserrule
forChebPoly
evaluation.Note that for the
rrule
, we don't yet support propagating derivatives through to changes in theChebPoly
object itself. It seems like this would involve allocating hugeTangent
objects for something that is rarely needed, so I marked it as@notimplemented
instead. (@gaurav-arya, do you know a way to do this only when it is desired?)Nor do we yet have rules for differentiating the
ChebPoly
constructor functions (e.g. if you want to compute sensitivity of the polynomial outputs to the data used to construct the polynomial). In principle, this should be straightforward since the polynomial construction is linear in the data.