Backends/SiaNet.Backend.TensorSharp/Expression/VariableExpression.cs
/// <summary>
/// Evaluates the specified write target.
/// </summary>
/// <param name="writeTarget">The write target.</param>
/// <returns>Tensor.</returns>
Evaluates the specified write target.
Evaluates the specified write target .
public override NDArray Evaluate(NDArray writeTarget)
        {
            using (var s = src.Evaluate(null))
            using (var i = indices.Evaluate(null))
            {
                if (!writeTarget.Equals(s))
                {
                    Ops.Copy(writeTarget, s);
                }
                Ops.ScatterFill(writeTarget, value.Evaluate(), dimension, i);
            }
            return writeTarget;
        }
public override NDArray Evaluate ( NDArray writeTarget ) { using ( var s = src . Evaluate ( null ) ) using ( var i = indices . Evaluate ( null ) ) { if ( ! writeTarget . Equals ( s ) ) { Ops . Copy ( writeTarget , s ) ; } Ops . ScatterFill ( writeTarget , value . Evaluate ( ) , dimension , i ) ; } return writeTarget ; }
Evaluates the specified write target.
Evaluates the specified write target .
None
writeTarget
NDArray
The write target.
The write target .