BackProp

Informations for backpropagation

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

Examples

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

Meta