magic_intpl#
- class diffsptk.MagicNumberInterpolation(magic_number=0)[source]#
See this page for details.
- Parameters:
- magic_numberfloat
The magic number to be interpolated.
- forward(x)[source]#
Interpolate magic number.
- Parameters:
- xTensor [shape=(B, N, D) or (N, D) or (N,)]
The data containing magic number.
- Returns:
- outTensor [shape=(B, N, D) or (N, D) or (N,)]
The data after interpolation.
Examples
>>> x = torch.tensor([0, 1, 2, 0, 4, 0]).float() >>> x tensor([0., 1., 2., 0., 4., 0.]) >>> magic_intpl = diffsptk.MagicNumberInterpolation(0) >>> y = magic_intpl(x) >>> y tensor([1., 1., 2., 3., 4., 4.])
- diffsptk.functional.magic_intpl(x, magic_number=0)[source]#
Interpolate magic number.
- Parameters:
- xTensor [shape=(B, N, D) or (N, D) or (N,)]
The data containing magic number.
- magic_numberfloat or Tensor
The magic number to be interpolated.
- Returns:
- outTensor [shape=(B, N, D) or (N, D) or (N,)]
The data after interpolation.
See also