Template Class Chainable

Class Documentation

template<class DataType>
class Chainable

Abstraction of an element in a computation graph for which a derivative can be calculated.

The name of this class comes from the fact that this element is composable (aka chainable) in the context of the chain rule of calculus.

Given that context, in the documentation for this class, the following notation is used:

  • Given an expression graph of composed functions, \(y\) refers to the final value resulting from evaluating the entire graph

  • \(w_i\) refers to the partial result of evaluating the expression subgraph rooted at the i-th Chainable element

  • \(\bar{w}_i\) refers to the adjoint of \(w_i\), where \(\bar{w}_i\) is defined as the partial derivative of \(y\) with respect to \(w_i\), or formally \(\bar{w}_i = \frac{\partial y}{\partial w_i}\)