Stack#

class myoverse.transforms.Stack(transforms, dim='representation', **kwargs)[source]#

Stack multiple tensors along a new dimension.

This is a container transform that holds multiple paths.

Parameters:
  • transforms (dict[str, Callable]) – Named transforms to apply and stack.

  • dim (str) – Name for the new stacking dimension.

Examples

>>> from myoverse.transforms.tensor import RMS, MAV, Stack
>>> stack = Stack({
...     'rms': RMS(window_size=200),
...     'mav': MAV(window_size=200),
... }, dim='feature')
>>> y = stack(x)  # Shape: (2, channel, time_windows)

Methods

__init__(transforms[, dim])

_apply(x)

Apply the transform.