Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Stops gradient computation.Stops the accumulated gradient of the inputs from flowing through this operatorin the backward direction. In other words, this operator prevents the contributionof its inputs to be taken into account for computing gradients.Example::  v1 = [1, 2]  v2 = [0, 1]  a = Variable('a')  b = Variable('b')  b_stop_grad = stop_gradient(3 * b)  loss = MakeLoss(b_stop_grad + a)  executor = loss.simple_bind(ctx=cpu(), a=(1,2), b=(1,2))  executor.forward(is_train=True, a=v1, b=v2)  executor.outputs  [ 1.  5.]  executor.backward()  executor.grad_arrays  [ 0.  0.]  [ 1.  1.]Defined in G:\deeplearn\mxnet\src\operator\tensor\elemwise_unary_op.cc:L128
/// </summary>
/// <param name="@out">output NDArray</param>
/// <param name="data">The input array.</param>
/// <returns>returns new symbol</returns>
Stops gradient computation.Stops the accumulated gradient of the inputs from flowing through this operatorin the backward direction.
Stops gradient computation . Stops the accumulated gradient of the inputs from flowing through this operatorin the backward direction .
public static NDArray BlockGrad(NDArray @out,
        NDArray data)
        {
            return new Operator("BlockGrad")
            .SetInput("data", data)
            .Invoke(@out);
        }
public static NDArray BlockGrad ( NDArray @out , NDArray data ) { return new Operator ( " " ) . SetInput ( " " , data ) . Invoke ( @out ) ; }
Stops gradient computation.Stops the accumulated gradient of the inputs from flowing through this operatorin the backward direction.
Stops gradient computation . Stops the accumulated gradient of the inputs from flowing through this operatorin the backward direction .
returns new symbol
returns new symbol
@out
NDArray
None
data
NDArray
The input array.
The input array .