Tenncor
|
#include <grad_def.hpp>
Public Member Functions | |
virtual | ~iGradientBuilder (void)=default |
virtual TensptrT | local_derivative (FuncptrT op, size_t arg_idx) const =0 |
virtual TensptrT | chain_rule (FuncptrT op, const TensptrT &local_der, TensptrT supcomp_grad, size_t arg_idx) const =0 |
virtual TensptrT | get_const_one (Shape shape) const =0 |
Return tensor representing 1 constant. More... | |
virtual TensptrT | get_const_zero (Shape shape) const =0 |
Return tensor representing 0 constant. More... | |
virtual TensptrT | add (TensptrT &lhs, TensptrT &rhs) const =0 |
Return functor representing lhs + rhs. More... | |
TensptrT | derive (TensptrT root, TensptrT target) const |
Return derivative of root with respect to target. More... | |
Define manditory definitions required for tensor differentiation For some graph F(G(x)), chain rule for calculating dF/dx is defined in the following order:
|
virtualdefault |
Return functor representing lhs + rhs.
Implemented in eteq::GradientBuilder< T >.
|
pure virtual |
Let op be functor F with arguments args, and local_der is derivative of F wrt one of args (say x) Let supcomp_grad be defined as dG/dF where G is some super-functor using F Return derivative G wrt to arg x by applying chain rule
Implemented in eteq::GradientBuilder< T >.
Return derivative of root with respect to target.
Return tensor representing 1 constant.
Implemented in eteq::GradientBuilder< T >.
Return tensor representing 0 constant.
Implemented in eteq::GradientBuilder< T >.
|
pure virtual |
Let op be functor F with arguments args Return derivative of F wrt args[arg_idx]
Implemented in eteq::GradientBuilder< T >.