Skip to content

Conversation

kuguma
Copy link

@kuguma kuguma commented Nov 21, 2022

Description

Corrected the description about the output shape of the DFT operator.

axis : int (default is 1)
The axis on which to perform the DFT. By default this value is set to 1, which corresponds to the first dimension after the batch index.

This fix follows the onnx 1.12.0 implementation.

@kuguma kuguma requested a review from a team as a code owner November 21, 2022 07:56
@kuguma
Copy link
Author

kuguma commented Nov 21, 2022

image

@gramalingam
Copy link
Contributor

@kuguma : thanks for the fix! Unfortunately, the documentation files are auto-generated. The change needs to be done in the source (here: https://github.com/onnx/onnx/blob/main/onnx/defs/math/defs.cc#L2912 ) and then the documentation generated (see:

python onnx/defs/gen_doc.py
)

@@ -6052,7 +6052,7 @@ This version of the operator has been available since version 17 of the default

<dl>
<dt><tt>output</tt> : T1</dt>
<dd>The Fourier Transform of the input vector.If onesided is 0, the following shape is expected: [batch_idx][signal_dim1][signal_dim2]...[signal_dimN][2]. If axis=0 and onesided is 1, the following shape is expected: [batch_idx][floor(signal_dim1/2)+1][signal_dim2]...[signal_dimN][2]. If axis=1 and onesided is 1, the following shape is expected: [batch_idx][signal_dim1][floor(signal_dim2/2)+1]...[signal_dimN][2]. If axis=N-1 and onesided is 1, the following shape is expected: [batch_idx][signal_dim1][signal_dim2]...[floor(signal_dimN/2)+1][2]. The signal_dim at the specified axis is equal to the dft_length.</dd>
<dd>The Fourier Transform of the input vector.If onesided is 0, the following shape is expected: [batch_idx][signal_dim1][signal_dim2]...[signal_dimN][2]. If axis=1 and onesided is 1, the following shape is expected: [batch_idx][floor(signal_dim1/2)+1][signal_dim2]...[signal_dimN][2]. If axis=2 and onesided is 1, the following shape is expected: [batch_idx][signal_dim1][floor(signal_dim2/2)+1]...[signal_dimN][2]. If axis=N and onesided is 1, the following shape is expected: [batch_idx][signal_dim1][signal_dim2]...[floor(signal_dimN/2)+1][2]. The signal_dim at the specified axis is equal to the dft_length.</dd>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same message must be modified in c++ definition as well.

@gramalingam
Copy link
Contributor

Created #4807 to redo this PR since this seems to have stalled. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants