Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Given three NDArrays, condition, x, and y, return an NDArray with the elements from x or y, depending on the elements from condition are true or false. x and y must have the same shape. If condition has the same shape as x, each element in the output array is from x if the corresponding element in the condition is true, and from y if false. If condition does not have the same shape as x, it must be a 1D array whose size is the same as x's first dimension size. Each row of the output array is from x's row if the corresponding element from condition is true, and from y's row if false.From:G:\deeplearn\mxnet\src\operator\tensor\control_flow_op.cc:39
/// </summary>
/// <param name="@out">output NDArray</param>
/// <param name="condition">condition array</param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns>returns new symbol</returns>
Given three NDArrays, condition, x, and y, return an NDArray with the elements from x or y, depending on the elements from condition are true or false. x and y must have the same shape. If condition has the same shape as x, each element in the output array is from x if the corresponding element in the condition is true, and from y if false. If condition does not have the same shape as x, it must be a 1D array whose size is the same as x's first dimension size.
Given three NDArrays condition x and y return an NDArray with the elements from x or y depending on the elements from condition are true or false . x and y must have the same shape . If condition has the same shape as x each element in the output array is from x if the corresponding element in the condition is true and from y if false . If condition does not have the same shape as x it must be a 1D array whose size is the same as x ' s first dimension size .
public static NDArray Where(NDArray @out,
        NDArray condition,
        NDArray x,
        NDArray y)
        {
            return new Operator("where")
            .SetInput("condition", condition)
            .SetInput("x", x)
            .SetInput("y", y)
            .Invoke(@out);
        }
public static NDArray Where ( NDArray @out , NDArray condition , NDArray x , NDArray y ) { return new Operator ( " " ) . SetInput ( " " , condition ) . SetInput ( " " , x ) . SetInput ( " " , y ) . Invoke ( @out ) ; }
Given three NDArrays, condition, x, and y, return an NDArray with the elements from x or y, depending on the elements from condition are true or false.
Given three NDArrays condition x and y return an NDArray with the elements from x or y depending on the elements from condition are true or false .
returns new symbol
returns new symbol
@out
NDArray
None
condition
NDArray
None
x
NDArray
None
y
NDArray
None