Aliases:
tf.signal.dcttf.spectral.dct
tf.signal.dct(
input,
type=2,
n=None,
axis=-1,
norm=None,
name=None
)
Defined in tensorflow/python/ops/signal/dct_ops.py.
Computes the 1D Discrete Cosine Transform (DCT) of input.
Currently only Types I, II and III are supported.
Type I is implemented using a length 2N padded tf.spectral.rfft.
Type II is implemented using a length 2N padded tf.spectral.rfft, as
described here:
https://dsp.stackexchange.com/a/10606.
Type III is a fairly straightforward inverse of Type II
(i.e. using a length 2N padded tf.spectral.irfft).
Args:
input: A[..., samples]float32Tensorcontaining the signals to take the DCT of.type: The DCT type to perform. Must be 1, 2 or 3.n: For future expansion. The length of the transform. Must beNone.axis: For future expansion. The axis to compute the DCT along. Must be-1.norm: The normalization to apply.Nonefor no normalization or'ortho'for orthonormal normalization.name: An optional name for the operation.
Returns:
A [..., samples] float32 Tensor containing the DCT of input.
Raises:
ValueError: Iftypeis not1,2or3,nis notNone,axisis not-1, ornormis notNoneor'ortho'`.ValueError: Iftypeis1andnormisortho.
Scipy Compatibility
Equivalent to scipy.fftpack.dct for Type-I, Type-II and Type-III DCT. https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.fftpack.dct.html