|TensorFlow 1 version||View source on GitHub|
Computes the 1D Discrete Cosine Transform (DCT) of
Compat aliases for migration
See Migration guide for more details.
tf.signal.dct( input, type=2, n=None, axis=-1, norm=None, name=None )
Types I, II, III and IV are supported.
Type I is implemented using a length
Type II is implemented using a length
described here: Type 2 DCT using 2N FFT padded (Makhoul).
Type III is a fairly straightforward inverse of Type II
(i.e. using a length
Type IV is calculated through 2N length DCT2 of padded signal and
picking the odd indices.
Tensorcontaining the signals to take the DCT of.
type: The DCT type to perform. Must be 1, 2, 3 or 4.
n: The length of the transform. If length is less than sequence length, only the first n elements of the sequence are considered for the DCT. If n is greater than the sequence length, zeros are padded and then the DCT is computed as usual.
axis: For future expansion. The axis to compute the DCT along. Must be
norm: The normalization to apply.
Nonefor no normalization or
'ortho'for orthonormal normalization.
name: An optional name for the operation.
Tensor containing the DCT of
Noneor greater than 0, or
Equivalent to scipy.fftpack.dct for Type-I, Type-II, Type-III and Type-IV DCT.