MinMax#

class myoverse.transforms.MinMax(dim='time', eps=1e-08, range=(0.0, 1.0), **kwargs)[source]#

Min-max normalization to [0, 1] range along a dimension.

Parameters:
  • dim (str) – Dimension to normalize over.

  • eps (float) – Small value to avoid division by zero.

  • range (tuple[float, float]) – Target range (default: (0, 1)).

Examples

>>> x = torch.randn(64, 2048, names=('channel', 'time'))
>>> minmax = MinMax(dim='time')
>>> y = minmax(x)  # Values in [0, 1]

Methods

__init__([dim, eps, range])

_apply(x)

Apply the transform.