interface IDifferentiable
Description
Represents a type that is differentiable for the purposes of automatic differentiation.
Implemented by builtin floating-point scalar types (float, half, double)
vector<T, N>, matrix<T, N, M> and Array<T, N> automatically conform to IDifferentiable if T conforms to IDifferentiable.
Associated types
_Differential
Constraints:
- IDifferentiable.This.Differential : IDifferentiable
Methods
Remarks
Types that implement IDifferentiable can be used with the automatic differentiation primitives bwd_diff and fwd_diff to load and store gradients of parameters. This interface supports automatic synthesis of requirements. A struct that conforms to IDifferentiable will have its Differential, dzero() and dadd() methods automatically synthesized based on its fields, if they are not already defined.