DFT
Description
Computes the discrete Fourier Transform (DFT) of the input.
Documentation illustration (illustration unavailable in the archive).
Assuming the input has shape [M, N], where N is the dimension over which the DFT is computed and M denotes the conceptual “all other dimensions,” the DFT y[m, k] of shape [M, N] is defined as
and the inverse transform is defined as
where j is the imaginary unit.
The actual shape of the output is specified in the “output” section. Reference : https://docs.scipy.org/doc/scipy/tutorial/fft.html
Input parameters
specified_outputs_name : array, this parameter lets you manually assign custom names to the output tensors of a node.
Graphs in : cluster, ONNX model architecture.
input (heterogeneous) – T1 : object, for real input, the following shape is expected: [signal_dim0][signal_dim1][signal_dim2]...[signal_dimN][1]. For complex input, the following shape is expected: [signal_dim0][signal_dim1][signal_dim2]...[signal_dimN][2]. The final dimension represents the real and imaginary parts of the value in that order.
dft_length (optional, heterogeneous) – T2 : object, the length of the signal as a scalar. If greater than the axis dimension, the signal will be zero-padded up to dft_length. If less than the axis dimension, only the first dft_length values will be used as the signal.
axis (optional, heterogeneous) – tensor(int64) : object, the axis as a scalar on which to perform the DFT. Default is -2 (last signal axis). Negative value means counting dimensions from the back. Accepted range is where r = rank(input). The last dimension is for representing complex numbers and thus is an invalid axis.
Documentation illustration (illustration unavailable in the archive).
Parameters : cluster,
inverse : boolean, whether the layer is in training mode (can store data for backward).
Default value “False”.
onesided : boolean, whether the layer is in training mode (can store data for backward).
Default value “False”.
training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.
name (optional) : string, name of the node.
Documentation illustration (illustration unavailable in the archive).
Output parameters
output (heterogeneous) – T1 : object, the Fourier Transform of the input vector. If onesided is 0, the following shape is expected: [signal_dim0][signal_dim1][signal_dim2]...[signal_dimN][2]. If axis=0 and onesided is 1, the following shape is expected: [floor(signal_dim0/2)+1][signal_dim1][signal_dim2]...[signal_dimN][2]. If axis=1 and onesided is 1, the following shape is expected: [signal_dim0][floor(signal_dim1/2)+1][signal_dim2]...[signal_dimN][2]. If axis=N and onesided is 1, the following shape is expected: [signal_dim0][signal_dim1][signal_dim2]...[floor(signal_dimN/2)+1][2]. The signal_dim at the specified axis is equal to the dft_length.
Type Constraints
T1 in (tensor(bfloat16), tensor(double), tensor(float), tensor(float16)) : Constrain input and output types to float tensors.
T2 in (tensor(int32), tensor(int64)) : Constrain scalar length types to integers.
Example
All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
