Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Applies softmax activation to input. This is intended for internal layers... note::  This operator has been deprecated, please use `softmax`.If `mode` = ``instance``, this operator will compute a softmax for each instance in the batch.This is the default mode.If `mode` = ``channel``, this operator will compute a k-class softmax at each positionof each instance, where `k` = ``num_channel``. This mode can only be used when the input arrayhas at least 3 dimensions.This can be used for `fully convolutional network`, `image segmentation`, etc.Example::  >>> input_array = mx.nd.array([[3., 0.5, -0.5, 2., 7.],  >>>                            [2., -.4, 7.,   3., 0.2]])  >>> softmax_act = mx.nd.SoftmaxActivation(input_array)  >>> print softmax_act.asnumpy()  [[  1.78322066e-02   1.46375655e-03   5.38485940e-04   6.56010211e-03   9.73605454e-01]   [  6.56221947e-03   5.95310994e-04   9.73919690e-01   1.78379621e-02   1.08472735e-03]]Defined in G:\deeplearn\mxnet\src\operator\softmax_activation.cc:L66
/// </summary>
/// <param name="@out">output NDArray</param>
/// <param name="data">Input array to activation function.</param>
/// <param name="mode">Specifies how to compute the softmax. If set to ``instance``, it computes softmax for each instance. If set to ``channel``, It computes cross channel softmax for each position of each instance.</param>
/// <returns>returns new symbol</returns>
Applies softmax activation to input. This is intended for internal layers...
Applies softmax activation to input . This is intended for internal layers ...
public static NDArray SoftmaxActivation(NDArray @out,
        NDArray data,
        SoftmaxactivationMode mode = SoftmaxactivationMode.Instance)
        {
            return new Operator("SoftmaxActivation")
            .SetParam("mode", NDUtil.EnumToString<SoftmaxactivationMode>(mode, SoftmaxactivationModeConvert))
            .SetInput("data", data)
            .Invoke(@out);
        }
public static NDArray SoftmaxActivation ( NDArray @out , NDArray data , SoftmaxactivationMode mode = SoftmaxactivationMode . Instance ) { return new Operator ( " " ) . SetParam ( " " , NDUtil . EnumToString < SoftmaxactivationMode > ( mode , SoftmaxactivationModeConvert ) ) . SetInput ( " " , data ) . Invoke ( @out ) ; }
Applies softmax activation to input.
Applies softmax activation to input .
returns new symbol
returns new symbol
@out
NDArray
None
data
NDArray
Input array to activation function.
Input array to activation function .
mode
SoftmaxactivationMode
Specifies how to compute the softmax. If set to ``instance``, it computes softmax for each instance. If set to ``channel``, It computes cross channel softmax for each position of each instance.
Specifies how to compute the softmax . If set to ` ` instance ` ` it computes softmax for each instance . If set to ` ` channel ` ` It computes cross channel softmax for each position of each instance .