コード例 #1
0
 public override void Backward(NDarray <double> dY)
 {
     left.Grad  = ND.AddBCleft(left.Grad, ND.Dot(dY, Yr.T));
     right.Grad = ND.AddBCleft(right.Grad, ND.Dot(Yl.T, dY));
     left.Backward(left.Grad);
     right.Backward(right.Grad);
 }
コード例 #2
0
 public override void Backward(NDarray <double> dY)
 {
     left.Grad  = ND.AddBCleft(left.Grad, ND.Mul(dY, Yr));
     right.Grad = ND.AddBCleft(right.Grad, ND.Mul(Yl, dY));
     left.Backward(left.Grad);
     right.Backward(right.Grad);
 }