Exemple #1
0
 public abstract void Backward(Scalar <Type> delta, Backpropagation bp);
Exemple #2
0
 private static Scalar <Type> notImplemented(Scalar <Type> x, Scalar <Type> y, Scalar <Type> f)
 {
     throw new NotImplementedException();
 }
Exemple #3
0
 public static bool IsConst <T>(this Scalar <T> thiz, T value) => thiz is Scalar <T> .Const c && c.Value.Equals(value);
Exemple #4
0
 public Binary Clone(Scalar <Type> x, Scalar <Type> y) => new Binary(this.FunctionName, x, y, this.Dx, this.Dy, this._extraInputs);
Exemple #5
0
 public Scalar <Type> Clone(Scalar <Type> x) => new Unary(FunctionName, x, Dx, _extraInputs);
Exemple #6
0
 public override void Backward(Scalar <Type> delta, Backpropagation bp) => bp.PushGradientTo(x, delta * (_dx = _dx ?? Dx(x, this)));
Exemple #7
0
 /// <summary> A simple operator with one input. </summary>
 /// <param name="functionName">Typehe functionName used by the compiler</param>
 /// <param name="x">the only input</param>
 /// <param name="dx">the derivative of this expression wrt x</param>
 /// <param name="extraInputs"></param>
 public Unary(string functionName, Scalar <Type> x, Func <Scalar <Type>, Scalar <Type>, Scalar <Type> > dx, object[] extraInputs = null) : base(functionName, new[] { x }, extraInputs)
 {
     this.Dx = dx;
 }
Exemple #8
0
 public override void Backward(Scalar <Type> delta, Backpropagation bp)
 {
 }