Backends/SiaNet.Backend.MxNet/NDArrayOps.cs
/// <summary>
/// Apply batch normalization to input.
/// </summary>
/// <param name="@out">output NDArray</param>
/// <param name="data">Input data to batch normalization</param>
/// <param name="eps">Epsilon to prevent div 0. Must be no less than CUDNN_BN_MIN_EPSILON defined in cudnn.h when using cudnn (usually 1e-5)</param>
/// <param name="momentum">Momentum for moving average</param>
/// <param name="fix_gamma">Fix gamma while training</param>
/// <param name="use_global_stats">Whether use global moving statistics instead of local batch-norm. This will force change batch-norm into a scale shift operator.</param>
/// <param name="output_mean_var">Output All,normal mean and var</param>
/// <param name="axis">Specify which shape axis the channel is specified</param>
/// <param name="cudnn_off">Do not select CUDNN operator, if available</param>
/// <returns>returns new symbol</returns>
Apply batch normalization to input.
Apply batch normalization to input .
public static NDArray CuDNNBatchNorm(NDArray @out,
        NDArray data,
        double eps = 0.001,
        float momentum = 0.9f,
        bool fix_gamma = true,
        bool use_global_stats = false,
        bool output_mean_var = false,
        int axis = 1,
        bool cudnn_off = false)
        {
            return new Operator("CuDNNBatchNorm")
            .SetParam("eps", eps)
            .SetParam("momentum", momentum)
            .SetParam("fix_gamma", fix_gamma)
            .SetParam("use_global_stats", use_global_stats)
            .SetParam("output_mean_var", output_mean_var)
            .SetParam("axis", axis)
            .SetParam("cudnn_off", cudnn_off)
            .SetInput("data", data)
            .Invoke(@out);
        }
public static NDArray CuDNNBatchNorm ( NDArray @out , NDArray data , double eps = 0.001 , float momentum = 0.9f , bool fix_gamma = true , bool use_global_stats = false , bool output_mean_var = false , int axis = 1 , bool cudnn_off = false ) { return new Operator ( " " ) . SetParam ( " " , eps ) . SetParam ( " " , momentum ) . SetParam ( " " , fix_gamma ) . SetParam ( " " , use_global_stats ) . SetParam ( " " , output_mean_var ) . SetParam ( " " , axis ) . SetParam ( " " , cudnn_off ) . SetInput ( " " , data ) . Invoke ( @out ) ; }
Apply batch normalization to input.
Apply batch normalization to input .
returns new symbol
returns new symbol
@out
NDArray
None
data
NDArray
Input data to batch normalization
Input data to batch normalization
eps
double
Epsilon to prevent div 0. Must be no less than CUDNN_BN_MIN_EPSILON defined in cudnn.h when using cudnn (usually 1e-5)
Epsilon to prevent div 0 . Must be no less than CUDNN_BN_MIN_EPSILON defined in cudnn . h when using cudnn ( usually 1e - 5 )
momentum
float
Momentum for moving average
Momentum for moving average
fix_gamma
bool
Fix gamma while training
Fix gamma while training
use_global_stats
bool
Whether use global moving statistics instead of local batch-norm. This will force change batch-norm into a scale shift operator.
Whether use global moving statistics instead of local batch - norm . This will force change batch - norm into a scale shift operator .
output_mean_var
bool
Output All,normal mean and var
Output All normal mean and var
axis
int
Specify which shape axis the channel is specified
Specify which shape axis the channel is specified
cudnn_off
bool
Do not select CUDNN operator, if available
Do not select CUDNN operator if available