Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Applies Leaky rectified linear unit activation element-wise to the input.Leaky ReLUs attempt to fix the "dying ReLU" problem by allowing a small `slope`when the input is negative and has a slope of one when input is positive.The following modified ReLU Activation functions are supported:- *elu*: Exponential Linear Unit. `y = x > 0 ? x : slope * (exp(x)-1)`- *leaky*: Leaky ReLU. `y = x > 0 ? x : slope * x`- *prelu*: Parametric ReLU. This is same as *leaky* except that `slope` is learnt during training.- *rrelu*: Randomized ReLU. same as *leaky* but the `slope` is uniformly and randomly chosen from  *[lower_bound, upper_bound)* for training, while fixed to be  *(lower_bound+upper_bound)/2* for inference.Defined in G:\deeplearn\mxnet\src\operator\leaky_relu.cc:L57
/// </summary>
/// <param name="data">Input data to activation function.</param>
/// <param name="act_type">Activation function to be applied.</param>
/// <param name="slope">Init slope for the activation. (For leaky and elu only)</param>
/// <param name="lower_bound">Lower bound of random slope. (For rrelu only)</param>
/// <param name="upper_bound">Upper bound of random slope. (For rrelu only)</param>
/// <returns>returns new symbol</returns>
Applies Leaky rectified linear unit activation element-wise to the input.Leaky ReLUs attempt to fix the "dying ReLU" problem by allowing a small `slope`when the input is negative and has a slope of one when input is positive.The following modified ReLU Activation functions are supported:- *elu*: Exponential Linear Unit.
Applies Leaky rectified linear unit activation element - wise to the input . Leaky ReLUs attempt to fix the " dying ReLU " problem by allowing a small ` slope ` when the input is negative and has a slope of one when input is positive . The following modified ReLU Activation functions are supported : - * elu * : Exponential Linear Unit .
public static NDArray LeakyReLU(NDArray data,
        LeakyreluActType act_type = LeakyreluActType.Leaky,
        float slope = 0.25f,
        float lower_bound = 0.125f,
        float upper_bound = 0.334f)
        {
            return new Operator("LeakyReLU")
            .SetParam("act_type", NDUtil.EnumToString<LeakyreluActType>(act_type, LeakyreluActTypeConvert))
            .SetParam("slope", slope)
            .SetParam("lower_bound", lower_bound)
            .SetParam("upper_bound", upper_bound)
            .SetInput("data", data)
            .Invoke();
        }
public static NDArray LeakyReLU ( NDArray data , LeakyreluActType act_type = LeakyreluActType . Leaky , float slope = 0.25f , float lower_bound = 0.125f , float upper_bound = 0.334f ) { return new Operator ( " " ) . SetParam ( " " , NDUtil . EnumToString < LeakyreluActType > ( act_type , LeakyreluActTypeConvert ) ) . SetParam ( " " , slope ) . SetParam ( " " , lower_bound ) . SetParam ( " " , upper_bound ) . SetInput ( " " , data ) . Invoke ( ) ; }
Applies Leaky rectified linear unit activation element-wise to the input.Leaky ReLUs attempt to fix the "dying ReLU" problem by allowing a small `slope`when the input is negative and has a slope of one when input is positive.The following modified ReLU Activation functions are supported:- *elu*: Exponential Linear Unit.
Applies Leaky rectified linear unit activation element - wise to the input . Leaky ReLUs attempt to fix the " dying ReLU " problem by allowing a small ` slope ` when the input is negative and has a slope of one when input is positive . The following modified ReLU Activation functions are supported : - * elu * : Exponential Linear Unit .
returns new symbol
returns new symbol
data
NDArray
Input data to activation function.
Input data to activation function .
act_type
LeakyreluActType
Activation function to be applied.
Activation function to be applied .
slope
float
Init slope for the activation. (For leaky and elu only)
Init slope for the activation . ( For leaky and elu only )
lower_bound
float
Lower bound of random slope. (For rrelu only)
Lower bound of random slope . ( For rrelu only )
upper_bound
float
Upper bound of random slope. (For rrelu only)
Upper bound of random slope . ( For rrelu only )