mindscience.sciops.dft.IDST
- class mindscience.sciops.dft.IDST(shape, compute_dtype=mstype.float32)[source]
1D inverse discrete sine transformation on real number on the last axis. The results should be same as scipy.fft.dct() . Reference: Wikipedia .
- Parameters
shape (tuple) – The shape of the dimensions to be transformed, other dimensions need not be included. Must be a length-1 tuple.
compute_dtype (mindspore.dtype) – The type of input tensor. Default:
mstype.float32.
- Inputs:
a (Tensor) - The real tensor to be transformed, with trailing dimensions aligned with shape.
- Outputs:
b (Tensor) - The output real tensor, with trailing dimensions aligned with shape.
Examples
>>> from mindspore import ops >>> from mindflow.cell import IDST >>> a = ops.rand((2, 32, 512)) >>> dft_cell = IDST(a.shape[-1:]) >>> b = dft_cell(a) >>> print(b.shape) (2, 32, 512)