decimate#
- class diffsptk.Decimation(period, start=0)[source]#
See this page for details.
- Parameters:
- periodint >= 1 [scalar]
Decimation period, \(P\).
- startint >= 0 [scalar]
Start point, \(S\).
- forward(x, dim=-1)[source]#
Decimate signal.
- Parameters:
- xTensor [shape=(…, T, …)]
Signal.
- dimint [scalar]
Dimension along which to decimate the tensors.
- Returns:
- yTensor [shape=(…, T/P-S, …)]
Decimated signal.
Examples
>>> x = torch.arange(9) >>> decimate = diffsptk.Decimation(3, start=1) >>> y = decimate(x) >>> y tensor([1, 4, 7])
See also