idct#

diffsptk.IDCT#

alias of InverseDiscreteCosineTransform

class diffsptk.InverseDiscreteCosineTransform(dct_length)[source]#

See this page for details.

Parameters:
dct_lengthint >= 1

DCT length, \(L\).

forward(y)[source]#

Apply inverse DCT to input.

Parameters:
yTensor [shape=(…, L)]

Input.

Returns:
outTensor [shape=(…, L)]

Inverse DCT output.

Examples

>>> x = diffsptk.ramp(3)
>>> dct = diffsptk.DCT(4)
>>> idct = diffsptk.IDCT(4)
>>> x2 = idct(dct(x))
>>> x2
tensor([-4.4703e-08,  1.0000e+00,  2.0000e+00,  3.0000e+00])
diffsptk.functional.idct(y)[source]#

Compute inverse DCT.

Parameters:
yTensor [shape=(…, L)]

Input.

Returns:
outTensor [shape=(…, L)]

Inverse DCT output.

See also

dct