LayerNorm#

class myoverse.transforms.LayerNorm(normalized_shape, eps=1e-05, **kwargs)[source]#

Layer normalization along specified dimensions.

Parameters:
  • normalized_shape (tuple[int, ...]) – Shape of the dimensions to normalize over.

  • eps (float) – Small value for numerical stability.

Examples

>>> x = torch.randn(32, 64, 200, names=('batch', 'channel', 'time'))
>>> lnorm = LayerNorm(normalized_shape=(64, 200))
>>> y = lnorm(x)  # Normalized over channel and time

Methods

__init__(normalized_shape[, eps])

_apply(x)

Apply the transform.