chainerx.batch_norm¶
- chainerx.batch_norm(x, gamma, beta, running_mean, running_var, eps=2e-05, decay=0.9, axis=None)¶
Batch normalization function.
It takes the input array
x
and two parameter arraysgamma
andbeta
. The parameter arrays must both have the same size.- Parameters
x (ndarray) – Input array.
gamma (ndarray) – Scaling parameter of normalized data.
beta (ndarray) – Shifting parameter of scaled normalized data.
running_mean (ndarray) – Running average of the mean. This is a running average of the mean over several mini-batches using the decay parameter. The function takes a previous running average, and updates the array in-place by the new running average.
running_var (ndarray) – Running average of the variance. This is a running average of the variance over several mini-batches using the decay parameter. The function takes a previous running average, and updates the array in-place by the new running average.
eps (float) – Epsilon value for numerical stability.
decay (float) – Decay rate of moving average. It is used during training.
axis (int, tuple of int or None) – Axis over which normalization is performed. When axis is
None
, the first axis is treated as the batch axis and will be reduced during normalization.
Note
During backpropagation, this function propagates the gradient of the output array to the input arrays
x
,gamma
andbeta
.See: Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift