STFT with 2D signal input
Author: robertknightCreated Sep 3, 2025Updated Sep 26, 2026
Labelstopic: operator
The STFT documentation states that the shape of the signal input must be 3D:
Input tensor representing a real or complex valued signal. For real input, the following shape is expected: [batch_size][signal_length][1]. For complex input, the following shape is expected: [batch_size][signal_length][2]
ONNX Runtime however accepts 2D inputs, treating them the same as the [batch_size][signal_length][1] case. Example of a model relying on this.
ORT's behavior here seems reasonable, so I think the change needed is just to update the documentation?
Source: onnx/onnx