Skip to content
fn

batch_norm_op

→TensorImplPtr
int batch_norm_op(const int & x, const int & gamma, const int & beta, double eps, const int & running_mean, const int & running_var, double momentum)

Python wrappers

Public Python APIs implemented by this engine symbol.

Public entry point for 2-D Batch Normalization.

Applies training-mode batch normalization over the batch and spatial (height, width) axes. This is the most common batch-norm variant — used by virtually every CNN.

See Also

BatchNorm2dBackward : Autograd node implementing the forward + backward.

Parameters

xTensorImplPtr
Input tensor of shape (B, C, H, W).
gammaTensorImplPtr
Per-channel scale of shape (C,).
betaTensorImplPtr
Per-channel shift of shape (C,).
epsdouble= None
Numerical-stability constant. Default: 1e-5.

Returns

TensorImplPtr

Normalised output, same shape as x.