SlidingWindowTransform#

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

Base class for sliding window transforms (GPU-accelerated).

Handles the common pattern of unfold + reduce over sliding windows. Subclasses only need to implement _compute_window to define the window-wise computation.

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 over.

Methods

__init__(window_size[, stride, dim])

_apply(x)

Apply the transform.

_compute_window(x_unfolded)

Compute the window-wise statistic.