Skip to content
fn

batch_norm_eval_op

→TensorImplPtr
int batch_norm_eval_op(const int & x, const int & mean, const int & var, const int & gamma, const int & beta, double eps)

Public free-function entry point for inference-mode Batch Normalization.

Thin wrapper that delegates to BatchNormEvalBackward::forward. This is the symbol the pybind11 binding layer forwards to from lucid.nn.functional.batch_norm when training=False.

See Also

BatchNormEvalBackward : Autograd node implementing the forward + backward. batch_norm_op : Training-mode counterpart that uses batch stats.

Parameters

xTensorImplPtr
Input tensor of shape (B, C, ...).
meanTensorImplPtr
Running per-channel mean of shape (C,).
varTensorImplPtr
Running per-channel variance of shape (C,).
gammaTensorImplPtr
Per-channel scale of shape (C,).
betaTensorImplPtr
Per-channel shift of shape (C,).
epsdouble
Numerical-stability constant.

Returns

TensorImplPtr

Normalised output, same shape as x.