You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The STFT op has the wrong "expected" shape that doesn't match it's output (correct) shape because of some off-by-one error.
2023-01-17 00:16:53.852917009 [W:onnxruntime:, execution_frame.cc:828 VerifyOutputSizes] Expected shape from model of {1,3002,201,2} does not match actual shape of {1,3001,201,2} for output Y
onnx output shape (1, 3001, 201, 2)
2023-01-17 00:16:53.852917009 [W:onnxruntime:, execution_frame.cc:828 VerifyOutputSizes] Expected shape from model of {1,3002,201,2} does not match actual shape of {1,3001,201,2} for output Y
onnx output shape (1, 3001, 201, 2)
Urgency
No response
Platform
Linux
OS Version
Ubuntu 22.10
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.13.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered:
bool is_onesided = static_cast<bool>(getAttribute(ctx, "onesided", 0));
if (is_onesided) {
dft_size = is_onesided ? ((dft_size >> 1) + 1) : dft_size;
}
auto n_dfts = static_cast<int64_t>((signal_size - dft_size) / static_cast<float>(frame_step_value)) + 1;
// The output has the following shape: [batch_size][frames][dft_unique_bins][2]
ONNX_NAMESPACE::TensorShapeProto result_shape_proto;
result_shape_proto.add_dim()->set_dim_value(input_shape.dim(0).dim_value()); // batch size
result_shape_proto.add_dim()->set_dim_value(n_dfts);
result_shape_proto.add_dim()->set_dim_value(dft_size);
result_shape_proto.add_dim()->set_dim_value(2);
It looks like the author intended dft_size to represent the window/frame length, but then repurposed it to represent the dft_unique_bins mentioned in the description. That makes the math for computing n_dfts wrong. I would instead expect something like this:
Describe the issue
The STFT op has the wrong "expected" shape that doesn't match it's output (correct) shape because of some off-by-one error.
Originally from pytorch/pytorch#92087 (comment)
This prevents adding new nodes after the STFT node since there will be expected shape mismatch.
To reproduce
Here is a standalone repro that creates a graph with only a STFT op, and we see the runtime throw the issue. Also happens with optimization enabled.
Urgency
No response
Platform
Linux
OS Version
Ubuntu 22.10
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.13.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: