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