xnn.trfnn.models.equiformer.EquivariantLayerNorm#

class xnn.trfnn.models.equiformer.EquivariantLayerNorm(irreps, eps=1e-05)[source]#

Bases: Module

Equivariant layer norm of an irreps feature (section 4.1).

Per irreps entry: the even scalars are centered over the channels; every entry is divided by the root mean square of its component-normalized norms over the channels and scaled by a learnable weight per channel; the even scalars get a learnable bias.

Parameters:
  • irreps (e3nn.o3.Irreps or str) – The irreps of the feature.

  • eps (float, optional) – Added to the mean square, by default 1e-5.

forward(x)[source]#

Normalize (N, irreps.dim).

Parameters:

x (Tensor)

Return type:

Tensor