RMS#

class myoverse.transforms.RMS(window_size, stride=None, dim='time', **kwargs)[source]#

Root Mean Square over sliding windows (GPU-accelerated).

Uses unfold for efficient sliding window computation on GPU.

Parameters:
  • window_size (int) – Window size in samples.

  • stride (int | None) – Stride between windows. If None, uses window_size (non-overlapping).

  • dim (str) – Dimension to compute RMS over.

Examples

>>> x = torch.randn(64, 2048, device='cuda', names=('channel', 'time'))
>>> rms = RMS(window_size=200, dim='time')
>>> y = rms(x)  # Shape: (64, 10)

Methods

_compute_window(x_unfolded)

Compute the window-wise statistic.