BackProp

stores information for backpropagation

struct BackProp {
Proc proc;
UntypedVariable[] gradOutputs;
size_t nGrad;
}

Members

Functions

backward
void backward(UntypedVariable* grad = null, size_t pos = 0)

error backward propagation

Examples

1 import std.stdio;
2 
3 UntypedVariable u;
4 {
5     auto v = [[0f, 1f], [2f, 3f]].variable;
6     u = UntypedVariable(v);
7 }
8 assert(u.get!(HostStorage!float) == [0, 1, 2, 3]);

Meta