Skip to content
fn

batch_norm1d_op

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

Public entry point for 1-D Batch Normalization.

Applies training-mode batch normalization over the batch and length axes of a sequence input. This is the symbol the pybind11 binding layer forwards to from lucid.nn.functional.batch_norm when the input has rank 3.

See Also

BatchNorm1dBackward : Autograd node implementing the forward + backward. batch_norm_eval_op : Inference-mode counterpart using running stats.

Parameters

xTensorImplPtr
Input tensor of shape (B, C, L).
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.