Skip to content
fn

group_norm_op

→TensorImplPtr
int group_norm_op(const int & x, const int & gamma, const int & beta, int num_groups, double eps)

Python wrappers

Public Python APIs implemented by this engine symbol.

Public free-function entry point for Group Normalization.

Thin wrapper that delegates to GroupNormBackward::forward. This is the symbol the pybind11 binding layer forwards to from lucid.nn.functional.group_norm.

See Also

GroupNormBackward : Autograd node implementing the forward + backward. layer_norm_op : Equivalent when num_groups == 1.

Parameters

xTensorImplPtr
Input tensor of shape (B, C, S_0, ...) with rank >= 2.
gammaTensorImplPtr
Per-channel scale of shape (C,).
betaTensorImplPtr
Per-channel shift of shape (C,).
num_groupsint
Number of groups; must divide C evenly.
epsdouble
Numerical-stability constant.

Returns

TensorImplPtr

Normalised output, same shape as x.