MagnitudeWarp#

class myoverse.transforms.MagnitudeWarp(sigma=0.2, n_knots=4, p=1.0, dim='time', **kwargs)[source]#

Warp magnitude using smooth random curves.

Creates smooth random scaling factors that vary over time.

Parameters:
  • sigma (float) – Standard deviation for the warping curves.

  • n_knots (int) – Number of control points for the spline.

  • p (float) – Probability of applying the augmentation.

  • dim (str) – Dimension to warp along.

Examples

>>> x = torch.randn(64, 2048, device='cuda', names=('channel', 'time'))
>>> warp = MagnitudeWarp(sigma=0.2, n_knots=4)
>>> y = warp(x)

Methods

__init__([sigma, n_knots, p, dim])

_apply(x)

Apply the transform.