xnn.trfnn.models.equiformer_v2.SeparableLayerNorm#

class xnn.trfnn.models.equiformer_v2.SeparableLayerNorm(lmax, channels, eps=1e-05)[source]#

Bases: Module

Separable layer norm (section 3.4): a layer norm on degree 0, one RMS over all degrees above 0.

The mean square of the higher degrees weights each degree equally (1 / (2l + 1) per component, averaged over the degrees).

Parameters:
  • lmax (int) – Highest degree.

  • channels (int) – Channels.

  • eps (float, optional) – By default 1e-5.

forward(x)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

x (Tensor)

Return type:

Tensor