shift_vertical
- selfeeg.augmentation.functional.shift_vertical(x: ArrayLike, value: float) ArrayLike[source]
adds a scalar value to the ArrayLike object.
- Parameters:
x (ArrayLike) – the input Tensor or Array.
value (float) – The scalar to add.
- Returns:
x (ArrayLike) – the augmented version of the input Tensor or Array.
Example
>>> import torch >>> import selfeeg.augmentation as aug >>> x = torch.zeros(16,32,1024) + torch.sin(torch.linspace(0, 8*torch.pi,1024)) >>> xaug = aug.shift_vertical(x, 4) >>> print(torch.equal(x+4,xaug)) # should return True