Function: Computes the Fourier transform of the input in a sliding window.
Formula:
When
[object Object]is set to[object Object]:When
[object Object]is set to[object Object]:
Where:
- FFT works on frequency
[object Object]. [object Object]is the index of the sliding window.[object Object]is a 1D or 2D tensor. When is 1D, there is only one time sequence. When[object Object]is 2D, there are multiple time sequences.[object Object]is the sliding window size.[object Object]is a 1D tensor, which is the window function (for example, hann_window) of STFT. Its length is[object Object].[object Object]is the rotation factor.
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.
Parameters
[object Object]Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
The input
[object Object]is different from that of the PyTorch interface. The input[object Object]of the PyTorch interface is the original input, while the input[object Object]of[object Object]is the result after the original input is padded by PyTorch.When the shape of the input self is [B, L], if the calculation result of the following formula is large, the calculation of the current API may time out.
nFft ≤ L
winLength ≤ nFft
normalized = True:
The mappings between the input and output data types of
[object Object],[object Object],[object Object], and[object Object]are as follows:[object Object]undefined
Deterministic computing:
[object Object]defaults to a deterministic implementation.
The following example is for reference only. For details, see .