Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[ONNX FE] Convert all STFT cases to ov::op::v15::STFT and relax Conv bias shape (#38427)

Maxim Vafin9082f040949b
diff --git a/.claude/skills/code-review/references/frontend.md b/.claude/skills/code-review/references/frontend.md
index aa650ed51a5..82c3691c867 100644
--- a/.claude/skills/code-review/references/frontend.md
+++ b/.claude/skills/code-review/references/frontend.md
@@ -34,6 +34,25 @@ under `src/bindings/python/src/openvino/frontend/` and
type information when runtime graph computation is required.
- Check that user-visible frontend behavior has focused regression tests,
including dynamic, boundary, and malformed-input cases where applicable.
+- Check that conversion tests actually run inference and compare the results
+ with expected values; a test that only prepares inputs and expected outputs
+ verifies nothing. Flag expected values that look like placeholders; they
+ should come from the framework or a trusted reference.
+- When a change lets inputs that had to be constants be runtime values, require
+ a positive test that feeds them at runtime and exercises output shapes that
+ depend on them, not only rejection tests.
+- Check that test tolerances fit the magnitude of the outputs. An absolute
+ tolerance that ignores the output scale can hide real errors or make the test
+ flaky.
+- When a change adds support for an operation or case, check the frontend's
+ expected-failure and skip lists for tests it now fixes. Newly passing strict
+ xfails fail CI.
+- Do not ask for frontend workarounds for plugin or reference-evaluator
+ limitations, such as a missing f64 kernel. Report them against the plugin.
+
+## Framework-specific guidance
+
+- ONNX frontend (`src/frontends/onnx/`): also apply [ONNX frontend review](onnx.md).
## Python decoders and bindings
diff --git a/.claude/skills/code-review/references/onnx.md b/.claude/skills/code-review/references/onnx.md
new file mode 100644
index 00000000000..ed1733545a0
--- /dev/null
+++ b/.claude/skills/code-review/references/onnx.md
@@ -0,0 +1,25 @@
+# ONNX Frontend Review
+
+Apply to changes under `src/frontends/onnx/`, in addition to the
+[frontend review guidance](frontend.md).
+
+## Tests
+
+- C++ conversion tests in `src/frontends/onnx/tests/*.in.cpp` build an
+ `ov::test::TestCase`. A test must call `run()` or `run_with_tolerance_as_fp()`;
+ otherwise it neither infers nor compares.
+- `run()` compares by mantissa bits, so it is too strict for accumulating
+ float ops. `run_with_tolerance_as_fp()` uses an absolute tolerance, so check
+ it against the output magnitude. `TestCase` compiles models with f32
+ inference precision on every device.
+- When conversion support changes, check and update the expected-failure
+ lists:
+ - strict xfails in `src/frontends/onnx/tests/tests_python/test_backend.py`,
+ together with the reason strings in `src/frontends/onnx/tests/__init__.py`;
+ - `src/frontends/onnx/tests/unit_test.manifest` and the per-backend manifests
+ under `src/frontends/onnx/tests/runtime/*/unit_test.manifest`.
+- Check that test models (`tests/models/*.prototxt`) are valid ONNX for the
+ declared opset: input element types match the operator's type constraints,
+ scalar inputs have no `dims`, and operators exist in the imported opset.
+ Prefer cross-checking expected values with onnxruntime or the ONNX reference
+ implementation.
diff --git a/src/frontends/onnx/frontend/src/op/conv.cpp b/src/frontends/onnx/frontend/src/op/conv.cpp
index 7056cc6f522..cca78061f8a 100644
--- a/src/frontends/onnx/frontend/src/op/conv.cpp
+++ b/src/frontends/onnx/frontend/src/op/conv.cpp
@@ -7,6 +7,8 @@
#include "exceptions.hpp"
#include "openvino/frontend/exception.hpp"
#include "openvino/op/add.hpp"
+#include "openvino/op/constant.hpp"
+#include "openvino/op/reshape.hpp"
#include "openvino/op/shape_of.hpp"
#include "utils/conv_factory.hpp"
#include "utils/convpool.hpp"
@@ -54,10 +56,10 @@ ov::OutputVector conv(const ov::frontend::onnx::Node& node,
if (ov::op::util::is_null(bias)) {
return {conv_node};
} else {
- const auto& bias_ps = bias.get_partial_shape();
-
- FRONT_END_GENERAL_CHECK(bias_ps.rank().is_static() && bias_ps.rank().get_length() == 1,
- "The bias input needs to be 1D vector");
+ // ONNX Runtime reads a non-1D bias (e.g. [1, C, 1, 1]) as its C flattened values.
+ if (bias.get_partial_shape().rank() != 1) {
+ bias = std::make_shared<v1::Reshape>(bias, v0::Constant::create(ov::element::i64, {1}, {-1}), false);
+ }
const std::string onnx_name = !node.get_name().empty() ? node.get_name() : node.output(0);
conv_node->set_friendly_name(onnx_name + "/WithoutBiases");
diff --git a/src/frontends/onnx/frontend/src/op/stft.cpp b/src/frontends/onnx/frontend/src/op/stft.cpp
index f3bf4c4bd76..a9000c13c73 100644
--- a/src/frontends/onnx/frontend/src/op/stft.cpp
+++ b/src/frontends/onnx/frontend/src/op/stft.cpp
@@ -7,137 +7,195 @@
#include "core/null_node.hpp"
#include "core/operator_set.hpp"
#include "exceptions.hpp"
+#include "openvino/op/add.hpp"
#include "openvino/op/broadcast.hpp"
#include "openvino/op/concat.hpp"
#include "openvino/op/constant.hpp"
+#include "openvino/op/convert.hpp"
+#include "openvino/op/convert_like.hpp"
+#include "openvino/op/gather.hpp"
#include "openvino/op/multiply.hpp"
+#include "openvino/op/pad.hpp"
+#include "openvino/op/range.hpp"
#include "openvino/op/reshape.hpp"
#include "openvino/op/shape_of.hpp"
-#include "openvino/op/slice.hpp"
+#include "openvino/op/split.hpp"
+#include "openvino/op/squeeze.hpp"
+#include "openvino/op/subtract.hpp"
+#include "openvino/op/transpose.hpp"
#include "openvino/op/unsqueeze.hpp"
#include "openvino/op/util/op_types.hpp"
#include "utils/common.hpp"
-#include "utils/dft.hpp"
+
using namespace ov::op;
-using ov::Shape;
namespace ov::frontend::onnx::ai_onnx::opset_17 {
+namespace {
+std::shared_ptr<v0::Constant> i64_const(const ov::Shape& shape, const std::vector<int64_t>& values) {
+ return v0::Constant::create(ov::element::i64, shape, values);
+}
+
+ov::Output<ov::Node> to_i64_scalar(const ov::Output<ov::Node>& value) {
+ const auto scalar = std::make_shared<v1::Reshape>(value, i64_const({0}, {}), false);
+ return std::make_shared<v0::Convert>(scalar, ov::element::i64);
+}
+
+ov::Output<ov::Node> get_dim(const ov::Output<ov::Node>& value, int64_t axis) {
+ return std::make_shared<v8::Gather>(std::make_shared<v3::ShapeOf>(value, ov::element::i64),
+ i64_const({}, {axis}),
+ i64_const({}, {0}));
+}
+
+// STFT of real signal [batch, signal_length] -> [batch, num_frames, dft_bins, 2].
+// ONNX STFT inputs: signal, frame_step, window (optional), frame_length (optional)
+// OpenVINO v15::STFT inputs: signal, window, frame_size, frame_step
+ov::Output<ov::Node> make_real_stft(const ov::Output<ov::Node>& data,
+ const ov::OutputVector& inputs,
+ bool window_provided,
+ bool frame_length_provided,
+ bool onesided) {
+ const auto frame_step = to_i64_scalar(inputs[1]);
+
+ // Default frame_length is the window length, or the signal length if window is not provided
+ ov::Output<ov::Node> frame_length;
+ if (frame_length_provided) {
+ frame_length = to_i64_scalar(inputs[3]);
+ } else if (window_provided) {
+ frame_length = to_i64_scalar(std::make_shared<v3::ShapeOf>(inputs[2], ov::element::i64));
+ } else {
+ frame_length = get_dim(data, 1);
+ }
+
+ const auto frame_length_1d = std::make_shared<v0::Unsqueeze>(frame_length, i64_const({}, {0}));
+ ov::Output<ov::Node> window;
+ if (!window_provided) {
+ window = std::make_shared<v3::Broadcast>(
+ std::make_shared<v1::ConvertLike>(v0::Constant::create(ov::element::f32, {}, {1}), data),
+ frame_length_1d);
+ } else if (frame_length_provided) {
+ // ONNX requires window length == frame_length, v15::STFT would pad a shorter window.
+ // Broadcast fails at runtime on mismatch and is eliminated when the shapes are known to match.
+ window = std::make_shared<v3::Broadcast>(inputs[2], frame_length_1d);
+ } else {
+ window = inputs[2];
+ }
+
+ const ov::Output<ov::Node> stft = std::make_shared<v15::STFT>(data, window, frame_length, frame_step, false);
+ if (onesided) {
+ return stft;
+ }
+ // Restore two-sided spectrum using Hermitian symmetry: X[k] = conj(X[N - k]), k = N/2+1 .. N-1
+ const auto bins_axis = i64_const({}, {2});
+ const auto mirror_indices =
+ std::make_shared<v4::Range>(std::make_shared<v1::Subtract>(frame_length, get_dim(stft, 2)),
+ i64_const({}, {0}),
+ i64_const({}, {-1}),
+ ov::element::i64);
+ const auto mirrored = std::make_shared<v8::Gather>(stft, mirror_indices, bins_axis);
+ const auto conj = std::make_shared<v1::Multiply>(
+ mirrored,
+ std::make_shared<v1::ConvertLike>(v0::Constant::create(ov::element::f32, {2}, {1.f, -1.f}), data));
+ return std::make_shared<v0::Concat>(ov::OutputVector{stft, conj}, 2);
+}
+
+// STFT of complex signal [batch, signal_length, 2] using linearity: STFT(a + ib) = STFT(a) + i * STFT(b)
+ov::Output<ov::Node> make_complex_stft(const ov::Output<ov::Node>& signal,
+ const ov::OutputVector& inputs,
+ bool window_provided,
+ bool frame_length_provided) {
+ // [batch, signal_length, 2] -> [2 * batch, signal_length], real parts first
+ const auto parts = std::make_shared<v1::Transpose>(signal, i64_const({3}, {2, 0, 1}));
+ const auto target_shape = std::make_shared<v0::Concat>(
+ ov::OutputVector{i64_const({1}, {-1}), std::make_shared<v0::Unsqueeze>(get_dim(signal, 1), i64_const({}, {0}))},
+ 0);
+ const auto data = std::make_shared<v1::Reshape>(parts, target_shape, false);
+
+ const auto stft = make_real_stft(data, inputs, window_provided, frame_length_provided, false);
+ const auto split = std::make_shared<v1::Split>(stft, i64_const({}, {0}), 2);
+ const auto& real_stft = split->output(0);
+ const auto& imag_stft = split->output(1);
+
+ // i * (x + iy) = -y + ix
+ const auto imag_rotated = std::make_shared<v1::Multiply>(
+ std::make_shared<v8::Gather>(imag_stft, i64_const({2}, {1, 0}), i64_const({}, {-1})),
+ std::make_shared<v1::ConvertLike>(v0::Constant::create(ov::element::f32, {2}, {-1.f, 1.f}), signal));
+ return std::make_shared<v1::Add>(real_stft, imag_rotated);
+}
+} // namespace
+
ov::OutputVector stft(const ov::frontend::onnx::Node& node) {
common::default_op_checks(node, 2, 4);
const ov::OutputVector ov_inputs{node.get_ov_inputs()};
- auto signal = ov_inputs.at(0);
- const auto signal_param_shape = signal.get_partial_shape();
- const auto window_node_provided = ov_inputs.size() > 2 && !ov::op::util::is_null(ov_inputs[2]);
- const auto dft_length_provided = ov_inputs.size() > 3 && !ov::op::util::is_null(ov_inputs[3]);
- const auto onesided = node.get_attribute_value<int64_t>("onesided", 1);
-
- // Use ov::op::v15::STFT for 2D signal - all inputs are required, output is onesided
- // Even if 2D input is not described in onnx spec, it is allowed by onnx model checker,
- // 2D input can be seen in real models and is supported by frameworks (including OpenVINO STFT)
- // The 2D shape is compatible with 3D case [batch, signal_length, 1] -> [batch, signal_length]
- const auto is_2d_signal = signal_param_shape.rank().is_static() && signal_param_shape.size() == 2;
- if (is_2d_signal && onesided && window_node_provided && dft_length_provided) {
- // ONNX STFT inputs: signal, frame_step, window (optional), frame_length (optional)
- // ONNX STFT output shape: [batch_size, num_frames, fft_length, 2]
- // OpenVINO v15::STFT inputs: data, window, frame_size, frame_step
- // OpenVINO v15::STFT output shape: [batch_size, num_frames, fft_length, 2] (transpose_frames=false)
- constexpr bool transpose_frames = false;
- return {std::make_shared<v15::STFT>(signal, ov_inputs[2], ov_inputs[3], ov_inputs[1], transpose_frames)};
- }
- // Use DFT-based decomposition for 3D signal or optional inputs
- CHECK_VALID_NODE(node,
- signal_param_shape.is_static() && signal_param_shape.size() == 3,
- "Shape of signal input must be static with the rank equal to 3.");
- const int64_t axis = 1;
+ const auto& signal = ov_inputs.at(0);
+ const auto& signal_shape = signal.get_partial_shape();
+ const auto window_provided = ov_inputs.size() > 2 && !ov::op::util::is_null(ov_inputs[2]);
+ const auto frame_length_provided = ov_inputs.size() > 3 && !ov::op::util::is_null(ov_inputs[3]);
+ const auto onesided = node.get_attribute_value<int64_t>("onesided", 1) == 1;
- const auto& frame_step_node = ov_inputs.at(1);
- CHECK_VALID_NODE(node,
- ov::op::util::is_constant(frame_step_node.get_node_shared_ptr()) &&
- ov::shape_size(frame_step_node.get_shape()) <= 1,
- "frame_step input must be a scalar or Shape{1} constant.");
- const auto frame_step =
- ov::as_type_ptr<v0::Constant>(frame_step_node.get_node_shared_ptr())->cast_vector<int64_t>()[0];
- CHECK_VALID_NODE(node,
- frame_step > 0,
- "Provided frame_step input value must be greater than zero. Got: ",
- frame_step);
-
- int64_t frame_length = signal_param_shape[axis].get_length() / frame_step; // default value
- if (dft_length_provided) {
- const auto& frame_length_node = ov_inputs[3];
- CHECK_VALID_NODE(node,
- ov::op::util::is_constant(frame_length_node.get_node_shared_ptr()) &&
- ov::shape_size(frame_length_node.get_shape()) <= 1,
- "frame_length input must be a scalar or Shape{1} constant.");
- frame_length =
- ov::as_type_ptr<v0::Constant>(frame_length_node.get_node_shared_ptr())->cast_vector<int64_t>()[0];
+ const auto is_int_or_dynamic = [](const ov::Output<ov::Node>& value) {
+ return value.get_element_type().is_dynamic() || value.get_element_type().is_integral_number();
+ };
+ const auto is_scalar_like = [](const ov::Output<ov::Node>& value) {
+ const auto& shape = value.get_partial_shape();
+ return shape.rank().is_dynamic() || shape.size() == 0 || (shape.size() == 1 && shape[0].compatible(1));
+ };
+ CHECK_VALID_NODE(node, is_int_or_dynamic(ov_inputs[1]), "frame_step input must be of integer type.");
+ CHECK_VALID_NODE(node, is_scalar_like(ov_inputs[1]), "frame_step input must be a scalar or Shape{1}.");
+ if (frame_length_provided) {
+ CHECK_VALID_NODE(node, is_int_or_dynamic(ov_inputs[3]), "frame_length input must be of integer type.");
+ CHECK_VALID_NODE(node, is_scalar_like(ov_inputs[3]), "frame_length input must be a scalar or Shape{1}.");
}
-
- if (window_node_provided) { // window input provided
- if (ov_inputs[2].get_partial_shape().rank().is_static()) {
+ if (window_provided) {
+ const auto& window_shape = ov_inputs[2].get_partial_shape();
+ CHECK_VALID_NODE(node, window_shape.rank().compatible(1), "The rank of window input must be 1D.");
+ if (frame_length_provided && window_shape.is_static() &&
+ ov::op::util::is_constant(ov_inputs[3].get_node_shared_ptr())) {
+ const auto frame_length =
+ ov::as_type_ptr<v0::Constant>(ov_inputs[3].get_node_shared_ptr())->cast_vector<int64_t>()[0];
CHECK_VALID_NODE(node,
- ov_inputs[2].get_partial_shape().rank().get_length() == 1,
- "The rank of window input must be 1D.");
- if (ov_inputs[2].get_partial_shape()[0].is_static()) {
- CHECK_VALID_NODE(node,
- ov_inputs[2].get_partial_shape()[0].get_length() == frame_length,
- "The length of window input must be equal to frame_length.");
- }
+ static_cast<int64_t>(window_shape[0].get_length()) == frame_length,
+ "The length of window input must be equal to frame_length.");
}
}
- const auto is_complex = [](const ov::Output<ov::Node>& data) {
- return data.get_partial_shape().rank().is_static() && (data.get_partial_shape().cend() - 1)->is_static() &&
- (data.get_partial_shape().cend() - 1)->get_length() == 2;
- };
- if (onesided == 1) {
- CHECK_VALID_NODE(node, !is_complex(signal), "If attribute onesided==1, signal input can NOT be complex.");
+
+ // 2D signal [batch, signal_length] is not described in onnx spec, but it is allowed by onnx model checker
+ // and seen in real models. It is treated as real signal.
+ CHECK_VALID_NODE(node,
+ signal_shape.rank().is_static() && (signal_shape.size() == 2 || signal_shape.size() == 3),
+ "Signal input must be of rank 3 [batch_size, signal_length, 1 or 2] or 2 [batch_size, "
+ "signal_length]. Got: ",
+ signal_shape);
+ if (signal_shape.size() == 2) {
+ return {make_real_stft(signal, ov_inputs, window_provided, frame_length_provided, onesided)};
}
- const int64_t batch_size = signal_param_shape[0].get_length();
- const auto nstfts = static_cast<int64_t>((signal_param_shape[axis].get_length() - frame_length) / frame_step) + 1;
- const auto axis_const = v0::Constant::create(ov::element::i64, {}, {axis});
- const auto zero_const = v0::Constant::create(ov::element::i64, {}, {0});
- const auto step = v0::Constant::create(ov::element::i64, ov::Shape{2}, {1, 1});
- ov::OutputVector all_signals;
- for (int64_t batch = 0; batch < batch_size; ++batch) {
- ov::OutputVector signals_in_batch;
- for (int64_t sig_idx = 0; sig_idx < nstfts; ++sig_idx) {
- const auto start =
- v0::Constant::create(ov::element::i64, ov::Shape{2}, std::vector<int64_t>{batch, sig_idx * frame_step});
- const auto stop =
- v0::Constant::create(ov::element::i64,
- ov::Shape{2},
- std::vector<int64_t>{batch + 1, sig_idx * frame_step + frame_length});
- const auto slice_axes = v0::Constant::create(ov::element::i64, ov::Shape{2}, std::vector<int64_t>{0, axis});
- const auto slice = std::make_shared<v8::Slice>(signal, start, stop, step, slice_axes);
- const ov::Output<ov::Node> flatten_slice = std::make_shared<v1::Reshape>(
- slice,
- is_complex(slice) ? v0::Constant::create(ov::element::i64, {2}, {-1, 2})
- : (onesided ? v0::Constant::create(ov::element::i64, {1}, {-1})
- : v0::Constant::create(ov::element::i64, {2}, {-1, 1})),
- false);
- const auto dft = dft::make_dft(
- window_node_provided
- ? std::make_shared<v1::Multiply>(
- flatten_slice,
- is_complex(flatten_slice)
- ? std::make_shared<v3::Broadcast>( // align window shape with signal shape
- std::make_shared<v0::Unsqueeze>(ov_inputs[2],
- v0::Constant::create(ov::element::i64, {1}, {1})),
- std::make_shared<v3::ShapeOf>(flatten_slice))
- : ov_inputs[2])
- : flatten_slice,
- dft_length_provided ? ov_inputs[3] : std::make_shared<NullNode>(),
- 0,
- false,
- onesided == 1);
- signals_in_batch.push_back(std::make_shared<v0::Unsqueeze>(dft, zero_const));
- }
- all_signals.push_back(
- std::make_shared<v0::Unsqueeze>(std::make_shared<v0::Concat>(signals_in_batch, 0), zero_const));
+ const auto& last_dim = signal_shape[2];
+ CHECK_VALID_NODE(node,
+ last_dim.compatible(1) || last_dim.compatible(2),
+ "The last dimension of signal input must be 1 (real) or 2 (complex). Got: ",
+ last_dim);
+ if (onesided) {
+ CHECK_VALID_NODE(node, last_dim.compatible(1), "If attribute onesided==1, signal input can NOT be complex.");
+ }
+ if (last_dim.compatible(1) && (onesided || last_dim.is_static())) {
+ const auto data = std::make_shared<v0::Squeeze>(signal, i64_const({1}, {2}));
+ return {make_real_stft(data, ov_inputs, window_provided, frame_length_provided, onesided)};
+ }
+
+ ov::Output<ov::Node> complex_signal = signal;
+ if (last_dim.is_dynamic()) {
+ // Real or complex signal is not known, pad the last dimension to 2 with zero imaginary part
+ const auto pads_end = std::make_shared<v0::Concat>(
+ ov::OutputVector{i64_const({2}, {0, 0}),
+ std::make_shared<v1::Subtract>(
+ i64_const({1}, {2}),
+ std::make_shared<v0::Unsqueeze>(get_dim(signal, 2), i64_const({}, {0})))},
+ 0);
+ complex_signal =
+ std::make_shared<v12::Pad>(signal, i64_const({3}, {0, 0, 0}), pads_end, ov::op::PadMode::CONSTANT);
}
- return {std::make_shared<v0::Concat>(all_signals, 0)};
+ return {make_complex_stft(complex_signal, ov_inputs, window_provided, frame_length_provided)};
}
ONNX_OP("STFT", OPSET_SINCE(1), ai_onnx::opset_17::stft);
diff --git a/src/frontends/onnx/tests/__init__.py b/src/frontends/onnx/tests/__init__.py
index 281252411f1..6fe528ae008 100644
--- a/src/frontends/onnx/tests/__init__.py
+++ b/src/frontends/onnx/tests/__init__.py
@@ -41,7 +41,7 @@ xfail_issue_33651 = xfail_test(reason="RuntimeError: OV does not support the fol
"TfIdfVectorizer")
xfail_issue_90649 = xfail_test(reason="RuntimeError: OV does not support the following ONNX operations:"
"DFT, LayerNormalization, "
- "MelWeightMatrix, SequenceMap, STFT")
+ "MelWeightMatrix, SequenceMap")
xfail_issue_35923 = xfail_test(reason="RuntimeError: PReLU without weights is not supported")
xfail_issue_38091 = xfail_test(reason="AssertionError: Mismatched elements")
xfail_issue_38699 = xfail_test(reason="RuntimeError: OV does not support the following ONNX operations: "
diff --git a/src/frontends/onnx/tests/models/conv_bias_4d.prototxt b/src/frontends/onnx/tests/models/conv_bias_4d.prototxt
new file mode 100644
index 00000000000..106fa913055
--- /dev/null
+++ b/src/frontends/onnx/tests/models/conv_bias_4d.prototxt
@@ -0,0 +1,91 @@
+ir_version: 7
+producer_name: "OpenVINO ONNX Frontend"
+graph {
+ node {
+ input: "data"
+ input: "filters"
+ input: "bias"
+ output: "out"
+ op_type: "Conv"
+ }
+ name: "conv_bias_4d"
+ initializer {
+ dims: 1
+ dims: 2
+ dims: 1
+ dims: 1
+ data_type: 1
+ float_data: 1
+ float_data: -2
+ name: "bias"
+ }
+ input {
+ name: "data"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 1
+ }
+ dim {
+ dim_value: 3
+ }
+ dim {
+ dim_value: 3
+ }
+ dim {
+ dim_value: 3
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "filters"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 3
+ }
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 2
+ }
+ }
+ }
+ }
+ }
+ output {
+ name: "out"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 1
+ }
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 2
+ }
+ }
+ }
+ }
+ }
+}
+opset_import {
+ version: 11
+}
diff --git a/src/frontends/onnx/tests/models/dynamic_shapes/conv_with_dynamic_rank_bias.prototxt b/src/frontends/onnx/tests/models/dynamic_shapes/conv_with_dynamic_rank_bias.prototxt
new file mode 100644
index 00000000000..f65e5c5267b
--- /dev/null
+++ b/src/frontends/onnx/tests/models/dynamic_shapes/conv_with_dynamic_rank_bias.prototxt
@@ -0,0 +1,92 @@
+ir_version: 3
+producer_name: "OpenVINO ONNX Frontend"
+model_version: 1
+graph {
+ node {
+ name: "dyn_conv"
+ input: "data"
+ input: "filters"
+ input: "bias"
+ output: "dyn_conv_out"
+ op_type: "Conv"
+ }
+ input {
+ name: "data"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 1
+ }
+ dim {
+ dim_value: 3
+ }
+ dim {
+ dim_value: 3
+ }
+ dim {
+ dim_value: 3
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "filters"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 3
+ }
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 2
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "bias"
+ type {
+ tensor_type {
+ elem_type: 1
+ }
+ }
+ }
+ output {
+ name: "dyn_conv_out"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 1
+ }
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 2
+ }
+ }
+ }
+ }
+ }
+ name: "conv_with_dynamic_rank_bias"
+}
+opset_import {
+ domain: ""
+ version: 11
+}
diff --git a/src/frontends/onnx/tests/models/stft_complex_dynamic_signal_shape.prototxt b/src/frontends/onnx/tests/models/stft_complex_dynamic_signal_shape.prototxt
new file mode 100644
index 00000000000..8308004bef0
--- /dev/null
+++ b/src/frontends/onnx/tests/models/stft_complex_dynamic_signal_shape.prototxt
@@ -0,0 +1,98 @@
+ir_version: 8
+graph {
+ node {
+ output: "frame_step"
+ name: "frame_step_const"
+ op_type: "Constant"
+ attribute {
+ name: "value"
+ t {
+ dims: 1
+ data_type: 7
+ int64_data: 8
+ name: "frame_step_tensor"
+ }
+ type: TENSOR
+ }
+ }
+ node {
+ output: "frame_length"
+ name: "frame_length_const"
+ op_type: "Constant"
+ attribute {
+ name: "value"
+ t {
+ dims: 1
+ data_type: 7
+ int64_data: 16
+ name: "frame_length_tensor"
+ }
+ type: TENSOR
+ }
+ }
+ node {
+ input: "signal"
+ input: "frame_step"
+ input: "window"
+ input: "frame_length"
+ output: "Y"
+ op_type: "STFT"
+ attribute {
+ name: "onesided"
+ i: 0
+ type: INT
+ }
+ }
+ input {
+ name: "signal"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ }
+ dim {
+ }
+ dim {
+ dim_value: 2
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "window"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 16
+ }
+ }
+ }
+ }
+ }
+ output {
+ name: "Y"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ }
+ dim {
+ }
+ dim {
+ }
+ dim {
+ }
+ }
+ }
+ }
+ }
+}
+opset_import {
+ domain: ""
+ version: 17
+}
diff --git a/src/frontends/onnx/tests/models/stft_float_frame_length.prototxt b/src/frontends/onnx/tests/models/stft_float_frame_length.prototxt
new file mode 100644
index 00000000000..2905efc936e
--- /dev/null
+++ b/src/frontends/onnx/tests/models/stft_float_frame_length.prototxt
@@ -0,0 +1,80 @@
+ir_version: 8
+graph {
+ node {
+ input: "signal"
+ input: "frame_step"
+ input: "window"
+ input: "frame_length"
+ output: "Y"
+ op_type: "STFT"
+ attribute {
+ name: "onesided"
+ i: 1
+ type: INT
+ }
+ }
+ name: "g"
+ input {
+ name: "signal"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 32
+ }
+ dim {
+ dim_value: 1
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_step"
+ type {
+ tensor_type {
+ elem_type: 7
+ shape {
+ }
+ }
+ }
+ }
+ input {
+ name: "window"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 16
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_length"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ }
+ }
+ }
+ }
+ output {
+ name: "Y"
+ type {
+ tensor_type {
+ elem_type: 1
+ }
+ }
+ }
+}
+opset_import {
+ version: 17
+}
diff --git a/src/frontends/onnx/tests/models/stft_float_frame_step.prototxt b/src/frontends/onnx/tests/models/stft_float_frame_step.prototxt
new file mode 100644
index 00000000000..765727a223f
--- /dev/null
+++ b/src/frontends/onnx/tests/models/stft_float_frame_step.prototxt
@@ -0,0 +1,80 @@
+ir_version: 8
+graph {
+ node {
+ input: "signal"
+ input: "frame_step"
+ input: "window"
+ input: "frame_length"
+ output: "Y"
+ op_type: "STFT"
+ attribute {
+ name: "onesided"
+ i: 1
+ type: INT
+ }
+ }
+ name: "g"
+ input {
+ name: "signal"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 32
+ }
+ dim {
+ dim_value: 1
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_step"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ }
+ }
+ }
+ }
+ input {
+ name: "window"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 16
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_length"
+ type {
+ tensor_type {
+ elem_type: 7
+ shape {
+ }
+ }
+ }
+ }
+ output {
+ name: "Y"
+ type {
+ tensor_type {
+ elem_type: 1
+ }
+ }
+ }
+}
+opset_import {
+ version: 17
+}
diff --git a/src/frontends/onnx/tests/models/stft_no_onesided_dynamic_last_dim.prototxt b/src/frontends/onnx/tests/models/stft_no_onesided_dynamic_last_dim.prototxt
new file mode 100644
index 00000000000..98e2c896fd3
--- /dev/null
+++ b/src/frontends/onnx/tests/models/stft_no_onesided_dynamic_last_dim.prototxt
@@ -0,0 +1,99 @@
+ir_version: 8
+graph {
+ node {
+ output: "frame_step"
+ name: "frame_step_const"
+ op_type: "Constant"
+ attribute {
+ name: "value"
+ t {
+ dims: 1
+ data_type: 7
+ int64_data: 8
+ name: "frame_step_tensor"
+ }
+ type: TENSOR
+ }
+ }
+ node {
+ output: "frame_length"
+ name: "frame_length_const"
+ op_type: "Constant"
+ attribute {
+ name: "value"
+ t {
+ dims: 1
+ data_type: 7
+ int64_data: 16
+ name: "frame_length_tensor"
+ }
+ type: TENSOR
+ }
+ }
+ node {
+ input: "signal"
+ input: "frame_step"
+ input: "window"
+ input: "frame_length"
+ output: "Y"
+ op_type: "STFT"
+ attribute {
+ name: "onesided"
+ i: 0
+ type: INT
+ }
+ }
+ input {
+ name: "signal"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 32
+ }
+ dim {
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "window"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 16
+ }
+ }
+ }
+ }
+ }
+ output {
+ name: "Y"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ }
+ dim {
+ }
+ dim {
+ }
+ dim {
+ }
+ }
+ }
+ }
+ }
+}
+opset_import {
+ domain: ""
+ version: 17
+}
diff --git a/src/frontends/onnx/tests/models/stft_non_const_frame_length.prototxt b/src/frontends/onnx/tests/models/stft_non_const_frame_length.prototxt
index de4e8479301..68bed7fec0d 100644
--- a/src/frontends/onnx/tests/models/stft_non_const_frame_length.prototxt
+++ b/src/frontends/onnx/tests/models/stft_non_const_frame_length.prototxt
@@ -64,7 +64,7 @@ graph {
name: "frame_length"
type {
tensor_type {
- elem_type: 1
+ elem_type: 7
shape {
dim {
dim_value: 16
diff --git a/src/frontends/onnx/tests/models/stft_non_const_frame_step.prototxt b/src/frontends/onnx/tests/models/stft_non_const_frame_step.prototxt
index 9e52d2d5859..87fd5956f4a 100644
--- a/src/frontends/onnx/tests/models/stft_non_const_frame_step.prototxt
+++ b/src/frontends/onnx/tests/models/stft_non_const_frame_step.prototxt
@@ -52,7 +52,7 @@ graph {
name: "frame_step"
type {
tensor_type {
- elem_type: 1
+ elem_type: 7
shape {
dim {
dim_value: 1
diff --git a/src/frontends/onnx/tests/models/stft_runtime_frame_length.prototxt b/src/frontends/onnx/tests/models/stft_runtime_frame_length.prototxt
new file mode 100644
index 00000000000..cfe05ddfeb5
--- /dev/null
+++ b/src/frontends/onnx/tests/models/stft_runtime_frame_length.prototxt
@@ -0,0 +1,78 @@
+ir_version: 8
+graph {
+ node {
+ input: "signal"
+ input: "frame_step"
+ input: ""
+ input: "frame_length"
+ output: "Y"
+ op_type: "STFT"
+ attribute {
+ name: "onesided"
+ i: 0
+ type: INT
+ }
+ }
+ name: "g"
+ input {
+ name: "signal"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_param: "batch"
+ }
+ dim {
+ dim_param: "length"
+ }
+ dim {
+ dim_value: 1
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_step"
+ type {
+ tensor_type {
+ elem_type: 7
+ shape {
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_length"
+ type {
+ tensor_type {
+ elem_type: 7
+ shape {
+ }
+ }
+ }
+ }
+ output {
+ name: "Y"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ }
+ dim {
+ }
+ dim {
+ }
+ dim {
+ dim_value: 2
+ }
+ }
+ }
+ }
+ }
+}
+opset_import {
+ version: 17
+}
diff --git a/src/frontends/onnx/tests/models/stft_runtime_frame_length_with_window.prototxt b/src/frontends/onnx/tests/models/stft_runtime_frame_length_with_window.prototxt
new file mode 100644
index 00000000000..5b004f95c40
--- /dev/null
+++ b/src/frontends/onnx/tests/models/stft_runtime_frame_length_with_window.prototxt
@@ -0,0 +1,80 @@
+ir_version: 8
+graph {
+ node {
+ input: "signal"
+ input: "frame_step"
+ input: "window"
+ input: "frame_length"
+ output: "Y"
+ op_type: "STFT"
+ attribute {
+ name: "onesided"
+ i: 1
+ type: INT
+ }
+ }
+ name: "g"
+ input {
+ name: "signal"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 2
+ }
+ dim {
+ dim_value: 32
+ }
+ dim {
+ dim_value: 1
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_step"
+ type {
+ tensor_type {
+ elem_type: 7
+ shape {
+ }
+ }
+ }
+ }
+ input {
+ name: "window"
+ type {
+ tensor_type {
+ elem_type: 1
+ shape {
+ dim {
+ dim_value: 16
+ }
+ }
+ }
+ }
+ }
+ input {
+ name: "frame_length"
+ type {
+ tensor_type {
+ elem_type: 7
+ shape {
+ }
+ }
+ }
+ }
+ output {
+ name: "Y"
+ type {
+ tensor_type {
+ elem_type: 1
+ }
+ }
+ }
+}
+opset_import {
+ version: 17
+}
diff --git a/src/frontends/onnx/tests/onnx_import_convpool.in.cpp b/src/frontends/onnx/tests/onnx_import_convpool.in.cpp
index bb829f2899d..e38c8702d92 100644
--- a/src/frontends/onnx/tests/onnx_import_convpool.in.cpp
+++ b/src/frontends/onnx/tests/onnx_import_convpool.in.cpp
@@ -260,6 +260,17 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias) {
test_case.run();
}
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_bias_4d) {
+ // bias initializer is [1, 2, 1, 1] instead of [2]; ONNX Runtime uses its flattened values
+ const auto model = convert_model("conv_bias_4d.onnx");
+
+ auto test_case = ov::test::TestCase(model, s_device);
+ test_case.add_input<float>(Shape{1, 3, 3, 3}, std::vector<float>(27, 1.f));
+ test_case.add_input<float>(Shape{2, 3, 2, 2}, std::vector<float>(24, 1.f));
+ test_case.add_expected_output<float>(Shape{1, 2, 2, 2}, {13.f, 13.f, 13.f, 13.f, 10.f, 10.f, 10.f, 10.f});
+ test_case.run();
+}
+
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_conv_transpose_w_groups) {
auto model = convert_model("conv_transpose_w_groups.onnx");
diff --git a/src/frontends/onnx/tests/onnx_import_dyn_shapes.in.cpp b/src/frontends/onnx/tests/onnx_import_dyn_shapes.in.cpp
index 9466011a23a..bdc998597f0 100644
--- a/src/frontends/onnx/tests/onnx_import_dyn_shapes.in.cpp
+++ b/src/frontends/onnx/tests/onnx_import_dyn_shapes.in.cpp
@@ -263,6 +263,23 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias) {
test_case.run();
}
+OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_rank_bias) {
+ const auto model = convert_model("dynamic_shapes/conv_with_dynamic_rank_bias.onnx");
+ const auto bias = model->get_parameters().at(2);
+ EXPECT_TRUE(bias->get_partial_shape().rank().is_dynamic());
+
+ // Plugins reject dynamic-rank parameters, so pin the runtime bias shape before inference.
+ model->reshape(std::map<ov::Output<ov::Node>, PartialShape>{{bias->output(0), PartialShape{2}}});
+
+ auto test_case = ov::test::TestCase(model, s_device);
+ test_case.add_input<float>(Shape{1, 3, 3, 3}, std::vector<float>(27, 1.f));
+ test_case.add_input<float>(Shape{2, 3, 2, 2}, std::vector<float>(24, 1.f));
+ test_case.add_input<float>(Shape{2}, {1.f, -2.f});
+ test_case.add_expected_output<float>(Shape{1, 2, 2, 2}, {13.f, 13.f, 13.f, 13.f, 10.f, 10.f, 10.f, 10.f});
+
+ test_case.run();
+}
+
OPENVINO_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape) {
const auto model = convert_model("dynamic_shapes/average_pool_2d_dyn.onnx");
diff --git a/src/frontends/onnx/tests/onnx_import_signal.in.cpp b/src/frontends/onnx/tests/onnx_import_signal.in.cpp
index a3f30798bb5..eb58d6592c0 100644
--- a/src/frontends/onnx/tests/onnx_import_signal.in.cpp
+++ b/src/frontends/onnx/tests/onnx_import_signal.in.cpp
@@ -16,6 +16,7 @@
#include "common_test_utils/file_utils.hpp"
#include "common_test_utils/test_case.hpp"
#include "common_test_utils/test_control.hpp"
+#include "common_test_utils/test_tools.hpp"
#include "onnx_utils.hpp"
using namespace ov;
@@ -24,241 +25,161 @@ using namespace ov::frontend::onnx::tests;
static std::string s_manifest = onnx_backend_manifest("${MANIFEST}");
static std::string s_device = backend_name_to_device("${BACKEND_NAME}");
+namespace {
+const std::vector<float> stft_window_16{1.0f,
+ 0.96194196f,
+ 0.8535616f,
+ 0.6913578f,
+ 0.5000232f,
+ 0.308685f,
+ 0.1464712f,
+ 0.038075745f,
+ 0.0f,
+ 0.03804031f,
+ 0.1464057f,
+ 0.3085994f,
+ 0.49993038f,
+ 0.6912722f,
+ 0.853496f,
+ 0.96190655f};
+} // namespace
+
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft) {
auto model = convert_model("dft.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
- 3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
- 6.000000f, 0.000000f, 7.000000f, 0.000000f, 8.000000f, 0.000000f,
- 9.000000f, 0.000000f, 10.000000f, 0.000000f, 11.000000f, 0.000000f,
- 12.000000f, 0.000000f, 13.000000f, 0.000000f, 14.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{3, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f,
+ 5.0f, 0.0f, 6.0f, 0.0f, 7.0f, 0.0f, 8.0f, 0.0f, 9.0f, 0.0f,
+ 10.0f, 0.0f, 11.0f, 0.0f, 12.0f, 0.0f, 13.0f, 0.0f, 14.0f, 0.0f});
test_case.add_expected_output<float>(
Shape{3, 5, 2},
- {10.000000f, 0.000000f, -2.500000f, 3.440955f, -2.500000f, 0.812299f, -2.500000f, -0.812299f,
- -2.500000f, -3.440955f, 35.000000f, 0.000000f, -2.500000f, 3.440955f, -2.500000f, 0.812299f,
- -2.500000f, -0.812299f, -2.500000f, -3.440955f, 60.000000f, 0.000000f, -2.500000f, 3.440955f,
- -2.500000f, 0.812299f, -2.500000f, -0.812299f, -2.500000f, -3.440955f});
+ {10.0f, 0.0f, -2.5f, 3.440955f, -2.5f, 0.812299f, -2.5f, -0.812299f, -2.5f, -3.440955f,
+ 35.0f, 0.0f, -2.5f, 3.440955f, -2.5f, 0.812299f, -2.5f, -0.812299f, -2.5f, -3.440955f,
+ 60.0f, 0.0f, -2.5f, 3.440955f, -2.5f, 0.812299f, -2.5f, -0.812299f, -2.5f, -3.440955f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_only_real) {
auto model = convert_model("dft_only_real.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 1},
- {
- 0.000000f,
- 1.000000f,
- 2.000000f,
- 3.000000f,
- 4.000000f,
- 5.000000f,
- 6.000000f,
- 7.000000f,
- 8.000000f,
- 9.000000f,
- 10.000000f,
- 11.000000f,
- 12.000000f,
- 13.000000f,
- 14.000000f,
- });
+ test_case.add_input<float>(
+ Shape{3, 5, 1},
+ {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f});
test_case.add_expected_output<float>(
Shape{3, 5, 2},
- {10.000000f, 0.000000f, -2.500000f, 3.440955f, -2.500000f, 0.812299f, -2.500000f, -0.812299f,
- -2.500000f, -3.440955f, 35.000000f, 0.000000f, -2.500000f, 3.440955f, -2.500000f, 0.812299f,
- -2.500000f, -0.812299f, -2.500000f, -3.440955f, 60.000000f, 0.000000f, -2.500000f, 3.440955f,
- -2.500000f, 0.812299f, -2.500000f, -0.812299f, -2.500000f, -3.440955f});
+ {10.0f, 0.0f, -2.5f, 3.440955f, -2.5f, 0.812299f, -2.5f, -0.812299f, -2.5f, -3.440955f,
+ 35.0f, 0.0f, -2.5f, 3.440955f, -2.5f, 0.812299f, -2.5f, -0.812299f, -2.5f, -3.440955f,
+ 60.0f, 0.0f, -2.5f, 3.440955f, -2.5f, 0.812299f, -2.5f, -0.812299f, -2.5f, -3.440955f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_onesided) {
auto model = convert_model("dft_onesided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(
- Shape{2, 4},
- {0.000000f, 1.000000f, 2.000000f, 3.000000f, 4.000000f, 5.000000f, 6.000000f, 7.000000f});
+ test_case.add_input<float>(Shape{2, 4}, {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f});
test_case.add_expected_output<float>(Shape{2, 3, 2},
- {6.000000f,
- 0.000000f,
- -2.000000f,
- 2.000000f,
- -2.000000f,
- 0.000000f,
- 22.000000f,
- 0.000000f,
- -2.000000f,
- 2.000000f,
- -2.000000f,
- 0.000000f});
+ {6.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, 22.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_onesided_skip_convert_to_complex) {
auto model = convert_model("dft_onesided_skip_convert_to_complex.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(
- Shape{2, 4, 1},
- {0.000000f, 1.000000f, 2.000000f, 3.000000f, 4.000000f, 5.000000f, 6.000000f, 7.000000f});
+ test_case.add_input<float>(Shape{2, 4, 1}, {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f});
test_case.add_expected_output<float>(Shape{2, 3, 1, 2},
- {6.000000f,
- 0.000000f,
- -2.000000f,
- 2.000000f,
- -2.000000f,
- 0.000000f,
- 22.000000f,
- 0.000000f,
- -2.000000f,
- 2.000000f,
- -2.000000f,
- 0.000000f});
+ {6.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, 22.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_length_provided) {
auto model = convert_model("dft_length_provided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
- 3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
- 6.000000f, 0.000000f, 7.000000f, 0.000000f, 8.000000f, 0.000000f,
- 9.000000f, 0.000000f, 10.000000f, 0.000000f, 11.000000f, 0.000000f,
- 12.000000f, 0.000000f, 13.000000f, 0.000000f, 14.000000f, 0.000000f});
- test_case.add_expected_output<float>(
- Shape{1, 5, 2},
- {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f, 3.000000f, 0.000000f, 4.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{3, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f,
+ 5.0f, 0.0f, 6.0f, 0.0f, 7.0f, 0.0f, 8.0f, 0.0f, 9.0f, 0.0f,
+ 10.0f, 0.0f, 11.0f, 0.0f, 12.0f, 0.0f, 13.0f, 0.0f, 14.0f, 0.0f});
+ test_case.add_expected_output<float>(Shape{1, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_scalar_length_provided) {
auto model = convert_model("dft_scalar_length_provided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
- 3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
- 6.000000f, 0.000000f, 7.000000f, 0.000000f, 8.000000f, 0.000000f,
- 9.000000f, 0.000000f, 10.000000f, 0.000000f, 11.000000f, 0.000000f,
- 12.000000f, 0.000000f, 13.000000f, 0.000000f, 14.000000f, 0.000000f});
- test_case.add_expected_output<float>(
- Shape{1, 5, 2},
- {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f, 3.000000f, 0.000000f, 4.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{3, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f,
+ 5.0f, 0.0f, 6.0f, 0.0f, 7.0f, 0.0f, 8.0f, 0.0f, 9.0f, 0.0f,
+ 10.0f, 0.0f, 11.0f, 0.0f, 12.0f, 0.0f, 13.0f, 0.0f, 14.0f, 0.0f});
+ test_case.add_expected_output<float>(Shape{1, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_length_provided_onesided) {
auto model = convert_model("dft_length_provided_onesided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{4, 3},
- {0.000000f,
- 1.000000f,
- 2.000000f,
- 3.000000f,
- 4.000000f,
- 5.000000f,
- 6.000000f,
- 7.000000f,
- 8.000000f,
- 9.000000f,
- 10.000000f,
- 11.000000f});
- test_case.add_expected_output<float>(Shape{1, 3, 2},
- {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{4, 3}, {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f});
+ test_case.add_expected_output<float>(Shape{1, 3, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse) {
auto model = convert_model("dft_inverse.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
- 3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
- 6.000000f, 0.000000f, 7.000000f, 0.000000f, 8.000000f, 0.000000f,
- 9.000000f, 0.000000f, 10.000000f, 0.000000f, 11.000000f, 0.000000f,
- 12.000000f, 0.000000f, 13.000000f, 0.000000f, 14.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{3, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f,
+ 5.0f, 0.0f, 6.0f, 0.0f, 7.0f, 0.0f, 8.0f, 0.0f, 9.0f, 0.0f,
+ 10.0f, 0.0f, 11.0f, 0.0f, 12.0f, 0.0f, 13.0f, 0.0f, 14.0f, 0.0f});
test_case.add_expected_output<float>(
Shape{3, 5, 2},
- {2.000000f, 0.000000f, -0.500000f, -0.688191f, -0.500000f, -0.162460f, -0.500000f, 0.162460f,
- -0.500000f, 0.688191f, 7.000000f, 0.000000f, -0.500000f, -0.688191f, -0.500000f, -0.162460f,
- -0.500000f, 0.162460f, -0.500000f, 0.688191f, 12.000000f, 0.000000f, -0.500000f, -0.688191f,
- -0.500000f, -0.162460f, -0.500000f, 0.162460f, -0.500000f, 0.688191f});
+ {2.0f, 0.0f, -0.5f, -0.688191f, -0.5f, -0.16246f, -0.5f, 0.16246f, -0.5f, 0.688191f,
+ 7.0f, 0.0f, -0.5f, -0.688191f, -0.5f, -0.16246f, -0.5f, 0.16246f, -0.5f, 0.688191f,
+ 12.0f, 0.0f, -0.5f, -0.688191f, -0.5f, -0.16246f, -0.5f, 0.16246f, -0.5f, 0.688191f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_only_real) {
auto model = convert_model("dft_inverse_only_real.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 1},
- {0.000000f,
- 1.000000f,
- 2.000000f,
- 3.000000f,
- 4.000000f,
- 5.000000f,
- 6.000000f,
- 7.000000f,
- 8.000000f,
- 9.000000f,
- 10.000000f,
- 11.000000f,
- 12.000000f,
- 13.000000f,
- 14.000000f});
+ test_case.add_input<float>(
+ Shape{3, 5, 1},
+ {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f});
test_case.add_expected_output<float>(
Shape{3, 5, 2},
- {2.000000f, 0.000000f, -0.500000f, -0.688191f, -0.500000f, -0.162460f, -0.500000f, 0.162460f,
- -0.500000f, 0.688191f, 7.000000f, 0.000000f, -0.500000f, -0.688191f, -0.500000f, -0.162460f,
- -0.500000f, 0.162460f, -0.500000f, 0.688191f, 12.000000f, 0.000000f, -0.500000f, -0.688191f,
- -0.500000f, -0.162460f, -0.500000f, 0.162460f, -0.500000f, 0.688191f});
+ {2.0f, 0.0f, -0.5f, -0.688191f, -0.5f, -0.16246f, -0.5f, 0.16246f, -0.5f, 0.688191f,
+ 7.0f, 0.0f, -0.5f, -0.688191f, -0.5f, -0.16246f, -0.5f, 0.16246f, -0.5f, 0.688191f,
+ 12.0f, 0.0f, -0.5f, -0.688191f, -0.5f, -0.16246f, -0.5f, 0.16246f, -0.5f, 0.688191f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_onesided) {
auto model = convert_model("dft_inverse_onesided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
test_case.add_input<float>(Shape{2, 3, 2},
- {6.000000f,
- 0.000000f,
- -2.000000f,
- 2.000000f,
- -2.000000f,
- 0.000000f,
- 22.000000f,
- 0.000000f,
- -2.000000f,
- 2.000000f,
- -2.000000f,
- 0.000000f});
- test_case.add_expected_output<float>(
- Shape{2, 4},
- {0.000000f, 1.000000f, 2.000000f, 3.000000f, 4.000000f, 5.000000f, 6.000000f, 7.000000f});
+ {6.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, 22.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f});
+ test_case.add_expected_output<float>(Shape{2, 4}, {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_onesided_real_input) {
auto model = convert_model("dft_inverse_onesided_real_input.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{2, 3, 1}, {1.000000f, 0.000000f, -1.000000f, 0.5000000f, -0.5000000f, 0.000000f});
- test_case.add_expected_output<float>(Shape{2, 3, 1},
- {0.750000f, -0.250000f, -0.500000f, 0.250000f, 0.250000f, -0.500000f});
+ test_case.add_input<float>(Shape{2, 3, 1}, {1.0f, 0.0f, -1.0f, 0.5f, -0.5f, 0.0f});
+ test_case.add_expected_output<float>(Shape{2, 3, 1}, {0.75f, -0.25f, -0.5f, 0.25f, 0.25f, -0.5f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_length_provided) {
auto model = convert_model("dft_inverse_length_provided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{3, 5, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f,
- 3.000000f, 0.000000f, 4.000000f, 0.000000f, 5.000000f, 0.000000f,
- 6.000000f, 0.000000f, 7.000000f, 0.000000f, 8.000000f, 0.000000f,
- 9.000000f, 0.000000f, 10.000000f, 0.000000f, 11.000000f, 0.000000f,
- 12.000000f, 0.000000f, 13.000000f, 0.000000f, 14.000000f, 0.000000f});
- test_case.add_expected_output<float>(
- Shape{1, 5, 2},
- {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f, 3.000000f, 0.000000f, 4.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{3, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f,
+ 5.0f, 0.0f, 6.0f, 0.0f, 7.0f, 0.0f, 8.0f, 0.0f, 9.0f, 0.0f,
+ 10.0f, 0.0f, 11.0f, 0.0f, 12.0f, 0.0f, 13.0f, 0.0f, 14.0f, 0.0f});
+ test_case.add_expected_output<float>(Shape{1, 5, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 3.0f, 0.0f, 4.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_dft_inverse_length_provided_onesided) {
auto model = convert_model("dft_inverse_length_provided_onesided.onnx");
auto test_case = ov::test::TestCase(model, s_device);
- test_case.add_input<float>(Shape{1, 3, 2}, {0.000000f, 0.000000f, 1.000000f, 0.000000f, 2.000000f, 0.000000f});
+ test_case.add_input<float>(Shape{1, 3, 2}, {0.0f, 0.0f, 1.0f, 0.0f, 2.0f, 0.0f});
test_case.add_expected_output<float>(Shape{4, 3},
- {0.000000f,
- 1.000000f,
- 2.000000f,
- 3.000000f,
- 4.000000f,
- 5.000000f,
- 6.000000f,
- 7.000000f,
- 8.000000f,
- 9.000000f,
- 10.000000f,
- 11.000000f});
+ {0.0f, 0.25f, 0.5f, 0.0f, 0.25f, 0.5f, 0.0f, 0.25f, 0.5f, 0.0f, 0.25f, 0.5f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_no_window_default_length) {
@@ -269,34 +190,21 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_no_window_def
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
test_case.add_expected_output<float>(
- Shape{1, 15, 9, 2},
- {120.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f,
- -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, 248.0f, 0.0f,
- -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f,
- -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, 376.0f, 0.0f, -8.0f, 40.218716f,
- -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f,
- -8.0f, 1.5912971f, -8.0f, 0.0f, 504.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f,
- -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f,
- -8.0f, 0.0f, 632.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f,
- -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f,
- 760.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f,
- -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, 888.0f, 0.0f,
- -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f,
- -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, 1016.0f, 0.0f, -8.0f, 40.218716f,
- -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f,
- -8.0f, 1.5912971f, -8.0f, 0.0f, 1144.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f,
- -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f,
- -8.0f, 0.0f, 1272.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f,
- -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f,
- 1400.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f,
- -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, 1528.0f, 0.0f,
- -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f,
- -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, 1656.0f, 0.0f, -8.0f, 40.218716f,
- -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f,
- -8.0f, 1.5912971f, -8.0f, 0.0f, 1784.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f,
- -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f,
- -8.0f, 0.0f, 1912.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f,
- -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f});
+ Shape{1, 1, 65, 2},
+ {8128.0f, 0.0f, -64.0f, 2607.071f, -64.0f, 1302.7499f, -64.0f, 867.62683f, -64.0f, 649.8029f,
+ -64.0f, 518.8983f, -64.0f, 431.45294f, -64.0f, 368.8411f, -64.0f, 321.74973f, -64.0f, 285.00494f,
+ -64.0f, 255.50232f, -64.0f, 231.26628f, -64.0f, 210.97972f, -64.0f, 193.73076f, -64.0f, 178.86801f,
+ -64.0f, 165.91376f, -64.0f, 154.50967f, -64.0f, 144.38168f, -64.0f, 135.31664f, -64.0f, 127.146164f,
+ -64.0f, 119.73558f, -64.0f, 112.9758f, -64.0f, 106.77755f, -64.0f, 101.06705f, -64.0f, 95.78277f,
+ -64.0f, 90.87302f, -64.0f, 86.294014f, -64.0f, 82.00842f, -64.0f, 77.98422f, -64.0f, 74.19379f,
+ -64.0f, 70.61312f, -64.0f, 67.221306f, -64.0f, 64.0f, -64.0f, 60.933064f, -64.0f, 58.006218f,
+ -64.0f, 55.20678f, -64.0f, 52.52344f, -64.0f, 49.94609f, -64.0f, 47.465633f, -64.0f, 45.073887f,
+ -64.0f, 42.76343f, -64.0f, 40.527554f, -64.0f, 38.360123f, -64.0f, 36.25555f, -64.0f, 34.208714f,
+ -64.0f, 32.214893f, -64.0f, 30.269745f, -64.0f, 28.36925f, -64.0f, 26.509668f, -64.0f, 24.687525f,
+ -64.0f, 22.899567f, -64.0f, 21.142744f, -64.0f, 19.414188f, -64.0f, 17.711185f, -64.0f, 16.031166f,
+ -64.0f, 14.37168f, -64.0f, 12.7303915f, -64.0f, 11.105054f, -64.0f, 9.493504f, -64.0f, 7.893647f,
+ -64.0f, 6.3034496f, -64.0f, 4.7209234f, -64.0f, 3.1441183f, -64.0f, 1.5711118f, -64.0f, 0.0f});
+ test_case.run_with_tolerance_as_fp(2e-2f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_real_input_no_window_default_length) {
@@ -307,55 +215,34 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_real_input_no_window_
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
test_case.add_expected_output<float>(
- Shape{1, 15, 16, 2},
- {120.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f,
- -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f,
- -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f,
- -8.0f, -40.218716f, 248.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f,
- -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f,
- -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f,
- -8.0f, -19.31371f, -8.0f, -40.218716f, 376.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f,
- -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f,
- -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f,
- -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f, 504.0f, 0.0f, -8.0f, 40.218716f,
- -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f,
- -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f,
- -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f, 632.0f, 0.0f,
- -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f,
- -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f,
- -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f,
- 760.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f,
- -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f,
- -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f,
- -8.0f, -40.218716f, 888.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f,
- -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f,
- -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f,
- -8.0f, -19.31371f, -8.0f, -40.218716f, 1016.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f,
- -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f,
- -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f,
- -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f, 1144.0f, 0.0f, -8.0f, 40.218716f,
- -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f,
- -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f,
- -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f, 1272.0f, 0.0f,
- -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f,
- -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f,
- -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f,
- 1400.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f,
- -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f,
- -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f,
- -8.0f, -40.218716f, 1528.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f,
- -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f,
- -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f,
- -8.0f, -19.31371f, -8.0f, -40.218716f, 1656.0f, 0.0f, -8.0f, 40.218716f, -8.0f, 19.31371f,
- -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f, -8.0f, 1.5912971f,
- -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f, -8.0f, -8.0f,
- -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f, 1784.0f, 0.0f, -8.0f, 40.218716f,
- -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f, -8.0f, 3.3137083f,
- -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f, -8.0f, -5.3454294f,
- -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f, 1912.0f, 0.0f,
- -8.0f, 40.218716f, -8.0f, 19.31371f, -8.0f, 11.972846f, -8.0f, 8.0f, -8.0f, 5.3454294f,
- -8.0f, 3.3137083f, -8.0f, 1.5912971f, -8.0f, 0.0f, -8.0f, -1.5912971f, -8.0f, -3.3137083f,
- -8.0f, -5.3454294f, -8.0f, -8.0f, -8.0f, -11.972846f, -8.0f, -19.31371f, -8.0f, -40.218716f});
+ Shape{1, 1, 128, 2},
+ {8128.0f, 0.0f, -64.0f, 2607.071f, -64.0f, 1302.7499f, -64.0f, 867.62683f, -64.0f, 649.8029f,
+ -64.0f, 518.8983f, -64.0f, 431.45294f, -64.0f, 368.8411f, -64.0f, 321.74973f, -64.0f, 285.00494f,
+ -64.0f, 255.50232f, -64.0f, 231.26628f, -64.0f, 210.97972f, -64.0f, 193.73076f, -64.0f, 178.86801f,
+ -64.0f, 165.91376f, -64.0f, 154.50967f, -64.0f, 144.38168f, -64.0f, 135.31664f, -64.0f, 127.146164f,
+ -64.0f, 119.73558f, -64.0f, 112.9758f, -64.0f, 106.77755f, -64.0f, 101.06705f, -64.0f, 95.78277f,
+ -64.0f, 90.87302f, -64.0f, 86.294014f, -64.0f, 82.00842f, -64.0f, 77.98422f, -64.0f, 74.19379f,
+ -64.0f, 70.61312f, -64.0f, 67.221306f, -64.0f, 64.0f, -64.0f, 60.933064f, -64.0f, 58.006218f,
+ -64.0f, 55.20678f, -64.0f, 52.52344f, -64.0f, 49.94609f, -64.0f, 47.465633f, -64.0f, 45.073887f,
+ -64.0f, 42.76343f, -64.0f, 40.527554f, -64.0f, 38.360123f, -64.0f, 36.25555f, -64.0f, 34.208714f,
+ -64.0f, 32.214893f, -64.0f, 30.269745f, -64.0f, 28.36925f, -64.0f, 26.509668f, -64.0f, 24.687525f,
+ -64.0f, 22.899567f, -64.0f, 21.142744f, -64.0f, 19.414188f, -64.0f, 17.711185f, -64.0f, 16.031166f,
+ -64.0f, 14.37168f, -64.0f, 12.7303915f, -64.0f, 11.105054f, -64.0f, 9.493504f, -64.0f, 7.893647f,
+ -64.0f, 6.3034496f, -64.0f, 4.7209234f, -64.0f, 3.1441183f, -64.0f, 1.5711118f, -64.0f, 0.0f,
+ -64.0f, -1.5711118f, -64.0f, -3.1441183f, -64.0f, -4.7209234f, -64.0f, -6.3034496f, -64.0f, -7.893647f,
+ -64.0f, -9.493504f, -64.0f, -11.105054f, -64.0f, -12.7303915f, -64.0f, -14.37168f, -64.0f, -16.031166f,
+ -64.0f, -17.711185f, -64.0f, -19.414188f, -64.0f, -21.142744f, -64.0f, -22.899567f, -64.0f, -24.687525f,
+ -64.0f, -26.509668f, -64.0f, -28.36925f, -64.0f, -30.269745f, -64.0f, -32.214893f, -64.0f, -34.208714f,
+ -64.0f, -36.25555f, -64.0f, -38.360123f, -64.0f, -40.527554f, -64.0f, -42.76343f, -64.0f, -45.073887f,
+ -64.0f, -47.465633f, -64.0f, -49.94609f, -64.0f, -52.52344f, -64.0f, -55.20678f, -64.0f, -58.006218f,
+ -64.0f, -60.933064f, -64.0f, -64.0f, -64.0f, -67.221306f, -64.0f, -70.61312f, -64.0f, -74.19379f,
+ -64.0f, -77.98422f, -64.0f, -82.00842f, -64.0f, -86.294014f, -64.0f, -90.87302f, -64.0f, -95.78277f,
+ -64.0f, -101.06705f, -64.0f, -106.77755f, -64.0f, -112.9758f, -64.0f, -119.73558f, -64.0f, -127.146164f,
+ -64.0f, -135.31664f, -64.0f, -144.38168f, -64.0f, -154.50967f, -64.0f, -165.91376f, -64.0f, -178.86801f,
+ -64.0f, -193.73076f, -64.0f, -210.97972f, -64.0f, -231.26628f, -64.0f, -255.50232f, -64.0f, -285.00494f,
+ -64.0f, -321.74973f, -64.0f, -368.8411f, -64.0f, -431.45294f, -64.0f, -518.8983f, -64.0f, -649.8029f,
+ -64.0f, -867.62683f, -64.0f, -1302.7499f, -64.0f, -2607.071f});
+ test_case.run_with_tolerance_as_fp(2e-2f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_window_default_length) {
@@ -365,487 +252,41 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_wind
std::vector<float> signal(ov::shape_size(signal_shape));
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
- test_case.add_expected_output<float>(Shape{1, 15, 16, 2},
- {240.0f,
- 256.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 496.0f,
- 512.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 752.0f,
- 768.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 1008.0f,
- 1024.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 1264.0f,
- 1280.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 1520.0f,
- 1536.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 1776.0f,
- 1792.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 2032.0f,
- 2048.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 2288.0f,
- 2304.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 2544.0f,
- 2560.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 2800.0f,
- 2816.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 3056.0f,
- 3072.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 3312.0f,
- 3328.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 3568.0f,
- 3584.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f,
- 3824.0f,
- 3840.0f,
- -96.43743187401357f,
- 64.43743187401357f,
- -54.62741699796952f,
- 22.627416997969522f,
- -39.94569220264782f,
- 7.945692202647823f,
- -32.0f,
- 0.0f,
- -26.69085820670878f,
- -5.3091417932912215f,
- -22.627416997969522f,
- -9.372583002030478f,
- -19.182597878074528f,
- -12.817402121925468f,
- -16.0f,
- -16.0f,
- -12.817402121925468f,
- -19.182597878074528f,
- -9.372583002030478f,
- -22.627416997969522f,
- -5.3091417932912215f,
- -26.69085820670878f,
- 0.0f,
- -32.0f,
- 7.945692202647823f,
- -39.94569220264782f,
- 22.627416997969522f,
- -54.62741699796952f,
- 64.43743187401357f,
- -96.43743187401357f});
+ test_case.add_expected_output<float>(
+ Shape{1, 1, 128, 2},
+ {16256.0f, 16384.0f, -5342.142f, 5086.142f, -2733.4998f, 2477.4998f, -1863.2537f, 1607.2537f,
+ -1427.6058f, 1171.6058f, -1165.7966f, 909.7966f, -990.9059f, 734.9059f, -865.6822f, 609.6822f,
+ -771.49945f, 515.49945f, -698.0099f, 442.0099f, -639.00464f, 383.00464f, -590.5326f, 334.53256f,
+ -549.9595f, 293.95944f, -515.46155f, 259.46152f, -485.73602f, 229.73604f, -459.8275f, 203.82751f,
+ -437.01935f, 181.01933f, -416.76337f, 160.76337f, -398.63327f, 142.63326f, -382.29233f, 126.29233f,
+ -367.47116f, 111.47115f, -353.9516f, 97.9516f, -341.55508f, 85.5551f, -330.1341f, 74.13409f,
+ -319.56555f, 63.565536f, -309.74603f, 53.746037f, -300.588f, 44.58802f, -292.01685f, 36.01684f,
+ -283.96844f, 27.96845f, -276.38757f, 20.387571f, -269.22623f, 13.226237f, -262.4426f, 6.4426045f,
+ -256.0f, 0.0f, -249.86613f, -6.133869f, -244.01244f, -11.987562f, -238.41356f, -17.586441f,
+ -233.04689f, -22.953115f, -227.89218f, -28.10782f, -222.93127f, -33.06873f, -218.14777f, -37.85223f,
+ -213.52687f, -42.473133f, -209.0551f, -46.944893f, -204.72025f, -51.27975f, -200.51111f, -55.488895f,
+ -196.41742f, -59.582573f, -192.42978f, -63.570213f, -188.53949f, -67.46051f, -184.7385f, -71.261505f,
+ -181.01933f, -74.98067f, -177.37505f, -78.624954f, -173.79913f, -82.20087f, -170.28549f, -85.71451f,
+ -166.82837f, -89.17162f, -163.42236f, -92.57763f, -160.06233f, -95.93767f, -156.74336f, -99.25664f,
+ -153.46078f, -102.539215f, -150.21011f, -105.789894f, -146.987f, -109.01299f, -143.7873f, -112.21271f,
+ -140.6069f, -115.3931f, -137.44185f, -118.55815f, -134.28824f, -121.71176f, -131.14223f, -124.85777f,
+ -128.0f, -128.0f, -124.85777f, -131.14223f, -121.71176f, -134.28824f, -118.55815f, -137.44185f,
+ -115.3931f, -140.6069f, -112.21271f, -143.7873f, -109.01299f, -146.987f, -105.789894f, -150.21011f,
+ -102.539215f, -153.46078f, -99.25664f, -156.74336f, -95.93767f, -160.06233f, -92.57763f, -163.42236f,
+ -89.17162f, -166.82837f, -85.71451f, -170.28549f, -82.20087f, -173.79913f, -78.624954f, -177.37505f,
+ -74.98067f, -181.01933f, -71.261505f, -184.7385f, -67.46051f, -188.53949f, -63.570213f, -192.42978f,
+ -59.582573f, -196.41742f, -55.488895f, -200.51111f, -51.27975f, -204.72025f, -46.944893f, -209.0551f,
+ -42.473133f, -213.52687f, -37.85223f, -218.14777f, -33.06873f, -222.93127f, -28.10782f, -227.89218f,
+ -22.953115f, -233.04689f, -17.586441f, -238.41356f, -11.987562f, -244.01244f, -6.133869f, -249.86613f,
+ 0.0f, -256.0f, 6.4426045f, -262.4426f, 13.226237f, -269.22623f, 20.387571f, -276.38757f,
+ 27.96845f, -283.96844f, 36.01684f, -292.01685f, 44.58802f, -300.588f, 53.746037f, -309.74603f,
+ 63.565536f, -319.56555f, 74.13409f, -330.1341f, 85.5551f, -341.55508f, 97.9516f, -353.9516f,
+ 111.47115f, -367.47116f, 126.29233f, -382.29233f, 142.63326f, -398.63327f, 160.76337f, -416.76337f,
+ 181.01933f, -437.01935f, 203.82751f, -459.8275f, 229.73604f, -485.73602f, 259.46152f, -515.46155f,
+ 293.95944f, -549.9595f, 334.53256f, -590.5326f, 383.00464f, -639.00464f, 442.0099f, -698.0099f,
+ 515.49945f, -771.49945f, 609.6822f, -865.6822f, 734.9059f, -990.9059f, 909.7966f, -1165.7966f,
+ 1171.6058f, -1427.6058f, 1607.2537f, -1863.2537f, 2477.4998f, -2733.4998f, 5086.142f, -5342.142f});
+ test_case.run_with_tolerance_as_fp(5e-2f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_window_default_length_2) {
@@ -855,71 +296,41 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_wind
std::vector<float> signal(ov::shape_size(signal_shape));
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
- test_case.add_expected_output<float>(Shape{2, 8, 8, 2},
- {56.0f, 64.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 184.0f, 192.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 312.0f, 320.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 440.0f, 448.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 568.0f, 576.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 696.0f, 704.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 824.0f, 832.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 952.0f, 960.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1080.0f, 1088.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1208.0f, 1216.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1336.0f, 1344.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1464.0f, 1472.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1592.0f, 1600.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1720.0f, 1728.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1848.0f, 1856.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f, -27.31370849898476f,
- 1976.0f, 1984.0f, -27.31370849898476f, 11.313708498984761f,
- -16.0f, 0.0f, -11.313708498984761f, -4.686291501015239f,
- -8.0f, -8.0f, -4.686291501015239f, -11.313708498984761f,
- 0.0f, -16.0f, 11.313708498984761f});
+ test_case.add_expected_output<float>(
+ Shape{2, 1, 64, 2},
+ {4032.0f, 4096.0f, -1366.7499f, 1238.7499f, -713.8029f, 585.8029f, -495.45294f, 367.45294f,
+ -385.74973f, 257.74973f, -319.50232f, 191.50232f, -274.97974f, 146.97972f, -242.86801f, 114.86802f,
+ -218.50967f, 90.50967f, -199.31664f, 71.31663f, -183.73558f, 55.735577f, -170.77754f, 42.77755f,
+ -159.78278f, 31.782768f, -150.294f, 22.29401f, -141.98422f, 13.984225f, -134.61311f, 6.6131186f,
+ -128.0f, 0.0f, -122.00622f, -5.993781f, -116.523445f, -11.476558f, -111.46564f, -16.534365f,
+ -106.763435f, -21.236567f, -102.36012f, -25.639875f, -98.20871f, -29.791286f, -94.269745f, -33.730255f,
+ -90.50967f, -37.490334f, -86.89957f, -41.100433f, -83.414185f, -44.58581f, -80.031166f, -47.968834f,
+ -76.73039f, -51.269608f, -73.4935f, -54.506496f, -70.30345f, -57.69655f, -67.14412f, -60.85588f,
+ -64.0f, -64.0f, -60.85588f, -67.14412f, -57.69655f, -70.30345f, -54.506496f, -73.4935f,
+ -51.269608f, -76.73039f, -47.968834f, -80.031166f, -44.58581f, -83.414185f, -41.100433f, -86.89957f,
+ -37.490334f, -90.50967f, -33.730255f, -94.269745f, -29.791286f, -98.20871f, -25.639875f, -102.36012f,
+ -21.236567f, -106.763435f, -16.534365f, -111.46564f, -11.476558f, -116.523445f, -5.993781f, -122.00622f,
+ 0.0f, -128.0f, 6.6131186f, -134.61311f, 13.984225f, -141.98422f, 22.29401f, -150.294f,
+ 31.782768f, -159.78278f, 42.77755f, -170.77754f, 55.735577f, -183.73558f, 71.31663f, -199.31664f,
+ 90.50967f, -218.50967f, 114.86802f, -242.86801f, 146.97972f, -274.97974f, 191.50232f, -319.50232f,
+ 257.74973f, -385.74973f, 367.45294f, -495.45294f, 585.8029f, -713.8029f, 1238.7499f, -1366.7499f,
+ 12224.0f, 12288.0f, -1366.7499f, 1238.7499f, -713.8029f, 585.8029f, -495.45294f, 367.45294f,
+ -385.74973f, 257.74973f, -319.50232f, 191.50232f, -274.97974f, 146.97972f, -242.86801f, 114.86802f,
+ -218.50967f, 90.50967f, -199.31664f, 71.31663f, -183.73558f, 55.735577f, -170.77754f, 42.77755f,
+ -159.78278f, 31.782768f, -150.294f, 22.29401f, -141.98422f, 13.984225f, -134.61311f, 6.6131186f,
+ -128.0f, 0.0f, -122.00622f, -5.993781f, -116.523445f, -11.476558f, -111.46564f, -16.534365f,
+ -106.763435f, -21.236567f, -102.36012f, -25.639875f, -98.20871f, -29.791286f, -94.269745f, -33.730255f,
+ -90.50967f, -37.490334f, -86.89957f, -41.100433f, -83.414185f, -44.58581f, -80.031166f, -47.968834f,
+ -76.73039f, -51.269608f, -73.4935f, -54.506496f, -70.30345f, -57.69655f, -67.14412f, -60.85588f,
+ -64.0f, -64.0f, -60.85588f, -67.14412f, -57.69655f, -70.30345f, -54.506496f, -73.4935f,
+ -51.269608f, -76.73039f, -47.968834f, -80.031166f, -44.58581f, -83.414185f, -41.100433f, -86.89957f,
+ -37.490334f, -90.50967f, -33.730255f, -94.269745f, -29.791286f, -98.20871f, -25.639875f, -102.36012f,
+ -21.236567f, -106.763435f, -16.534365f, -111.46564f, -11.476558f, -116.523445f, -5.993781f, -122.00622f,
+ 0.0f, -128.0f, 6.6131186f, -134.61311f, 13.984225f, -141.98422f, 22.29401f, -150.294f,
+ 31.782768f, -159.78278f, 42.77755f, -170.77754f, 55.735577f, -183.73558f, 71.31663f, -199.31664f,
+ 90.50967f, -218.50967f, 114.86802f, -242.86801f, 146.97972f, -274.97974f, 191.50232f, -319.50232f,
+ 257.74973f, -385.74973f, 367.45294f, -495.45294f, 585.8029f, -713.8029f, 1238.7499f, -1366.7499f});
+ test_case.run_with_tolerance_as_fp(5e-2f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_window_no_default_length) {
@@ -929,391 +340,57 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_no_wind
std::vector<float> signal(ov::shape_size(signal_shape));
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
- test_case.add_expected_output<float>(Shape{4, 2, 24, 2},
- {552.0f,
- 576.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 936.0f,
- 960.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 2088.0f,
- 2112.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 2472.0f,
- 2496.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 3624.0f,
- 3648.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 4008.0f,
- 4032.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 5160.0f,
- 5184.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f,
- 5544.0f,
- 5568.0f,
- -206.29809870540362f,
- 158.29809870540362f,
- -113.56921938165306f,
- 65.56921938165306f,
- -81.94112549695429f,
- 33.941125496954285f,
- -65.56921938165306f,
- 17.569219381653056f,
- -55.277408948188935f,
- 7.277408948188935f,
- -48.0f,
- 0.0f,
- -42.41584771149505f,
- -5.584152288504953f,
- -37.856406460551014f,
- -10.143593539448982f,
- -33.941125496954285f,
- -14.058874503045715f,
- -30.430780618346944f,
- -17.569219381653056f,
- -27.159659942097512f,
- -20.840340057902488f,
- -24.0f,
- -24.0f,
- -20.840340057902495f,
- -27.159659942097505f,
- -17.569219381653056f,
- -30.430780618346944f,
- -14.058874503045715f,
- -33.941125496954285f,
- -10.143593539448982f,
- -37.856406460551014f,
- -5.584152288504953f,
- -42.41584771149505f,
- 0.0f,
- -48.0f,
- 7.277408948188942f,
- -55.27740894818894f,
- 17.569219381653056f,
- -65.56921938165306f,
- 33.941125496954285f,
- -81.94112549695429f,
- 65.56921938165306f,
- -113.56921938165306f,
- 158.29809870540362f,
- -206.29809870540362f});
+ test_case.add_expected_output<float>(
+ Shape{4, 2, 24, 2},
+ {552.0f, 576.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 936.0f, 960.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 2088.0f, 2112.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 2472.0f, 2496.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 3624.0f, 3648.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 4008.0f, 4032.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 5160.0f, 5184.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f,
+ 5544.0f, 5568.0f, -206.2981f, 158.2981f, -113.56922f, 65.56922f, -81.941124f, 33.941124f,
+ -65.56922f, 17.56922f, -55.27741f, 7.277409f, -48.0f, 0.0f, -42.415848f, -5.584152f,
+ -37.856407f, -10.143594f, -33.941124f, -14.058874f, -30.43078f, -17.56922f, -27.15966f, -20.84034f,
+ -24.0f, -24.0f, -20.84034f, -27.15966f, -17.56922f, -30.43078f, -14.058874f, -33.941124f,
+ -10.143594f, -37.856407f, -5.584152f, -42.415848f, 0.0f, -48.0f, 7.277409f, -55.27741f,
+ 17.56922f, -65.56922f, 33.941124f, -81.941124f, 65.56922f, -113.56922f, 158.2981f, -206.2981f});
+ test_case.run_with_tolerance_as_fp(1e-2f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_window_default_length) {
@@ -1327,74 +404,49 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_w
{1.0f, 0.8535616f, 0.5000232f, 0.1464712f, 0.0f, 0.1464057f, 0.49993038f, 0.853496f});
test_case.add_expected_output<float>(
Shape{3, 7, 8, 2},
- {23.9982088804245f, 27.99809694290161f, -3.6551388463010377f, 21.654558190325933f, -17.655848562717438f,
- 1.6573804020881653f, -11.656437880922656f, -4.342796101262486f, -7.999694228172302f, -7.999675154685974f,
- -4.342819217778247f, -11.656414517382817f, 1.6573339104652405f, -17.655802190303802f, 19.65439594500194f,
- -1.6553475716806292f, 55.997313380241394f, 59.997201442718506f, 12.346159116290885f, 37.6528883872892f,
- -17.65547662973404f, 1.6577513813972473f, -11.65625294879657f, -4.342609192943764f, -7.999541640281677f,
- -7.999522566795349f, -4.342632309459525f, -11.656229585256732f, 1.6577048897743225f, -17.655430257320404f,
- 35.65272614196521f, 14.345950390911293f, 87.99641788005829f, 91.9963059425354f, 28.347457078882808f,
- 53.651218584252476f, -17.65510469675064f, 1.6581223607063293f, -11.656068016670485f, -4.342422284625041f,
- -7.999389052391052f, -7.999369978904724f, -4.342445401140804f, -11.65604465313065f, 1.6580758690834045f,
- -17.655058324337006f, 51.651056338928484f, 30.347248353503215f, 119.99552237987518f, 123.9954104423523f,
- 44.34875504147473f, 69.64954878121574f, -17.654732763767242f, 1.6584933400154114f, -11.6558830845444f,
- -4.34223537630632f, -7.999236464500427f, -7.999217391014099f, -4.342258492822079f, -11.65585972100456f,
- 1.6584468483924866f, -17.654686391353607f, 67.64938653589175f, 46.34854631609514f, 151.99462687969208f,
- 155.9945149421692f, 60.35005300406665f, 85.64787897817901f, -17.654360830783844f, 1.6588643193244934f,
- -11.65569815241831f, -4.3420484679875955f, -7.999083876609802f, -7.999064803123474f, -4.342071584503358f,
- -11.655674788878471f, 1.6588178277015686f, -17.65431445837021f, 83.64771673285502f, 62.34984427868706f,
- 183.99373137950897f, 187.99361944198608f, 76.35135096665857f, 101.64620917514227f, -17.653988897800446f,
- 1.6592352986335754f, -11.655513220292228f, -4.341861559668871f, -7.998931288719177f, -7.998912215232849f,
- -4.341884676184634f, -11.65548985675239f, 1.6591888070106506f, -17.65394252538681f, 99.64604692981828f,
- 78.35114224127898f, 215.99283587932587f, 219.99272394180298f, 92.3526489292505f, 117.64453937210556f,
- -17.653616964817047f, 1.6596062779426575f, -11.655328288166146f, -4.341674651350154f, -7.998778700828552f,
- -7.998759627342224f, -4.3416977678659165f, -11.655304924626307f, 1.6595597863197327f, -17.653570592403412f,
- 115.64437712678156f, 94.35244020387091f, 279.99104487895966f, 283.99093294143677f, 124.35524485443435f,
- 149.6411997660321f, -17.65287309885025f, 1.6603482365608215f, -11.654958423913968f, -4.341300834712712f,
- -7.998473525047302f, -7.998454451560974f, -4.341323951228475f, -11.654935060374129f, 1.6603017449378967f,
- -17.652826726436615f, 147.6410375207081f, 126.35503612905475f, 311.99014937877655f, 315.99003744125366f,
- 140.35654281702625f, 165.63952996299537f, -17.652501165866852f, 1.6607192158699036f, -11.654773491787878f,
- -4.341113926393987f, -7.998320937156677f, -7.998301863670349f, -4.34113704290975f, -11.65475012824804f,
- 1.6606727242469788f, -17.652454793453217f, 163.63936771767135f, 142.35633409164666f, 343.98925387859344f,
- 347.98914194107056f, 156.3578407796182f, 181.63786015995862f, -17.652129232883453f, 1.6610901951789856f,
- -11.654588559661818f, -4.340927018075263f, -7.998168349266052f, -7.998149275779724f, -4.340950134591026f,
- -11.654565196121965f, 1.6610437035560608f, -17.652082860469818f, 179.63769791463466f, 158.3576320542386f,
- 375.98835837841034f, 379.98824644088745f, 172.35913874221012f, 197.63619035692193f, -17.651757299900055f,
- 1.6614611744880676f, -11.654403627535729f, -4.340740109756538f, -7.998015761375427f, -7.997996687889099f,
- -4.340763226272301f, -11.65438026399589f, 1.6614146828651428f, -17.65171092748642f, 195.6360281115979f,
- 174.35893001683053f, 407.98746287822723f, 411.98735094070435f, 188.36043670480203f, 213.63452055388518f,
- -17.651385366916656f, 1.6618321537971497f, -11.65421869540964f, -4.340553201437814f, -7.997863173484802f,
- -7.997844099998474f, -4.340576317953577f, -11.6541953318698f, 1.6617856621742249f, -17.65133899450302f,
- 211.6343583085612f, 190.36022797942243f, 439.9865673780441f, 443.98645544052124f, 204.36173466739393f,
- 229.63285075084843f, -17.651013433933258f, 1.6622031331062317f, -11.65403376328355f, -4.340366293119089f,
- -7.997710585594177f, -7.997691512107849f, -4.340389409634852f, -11.654010399743711f, 1.6621566414833069f,
- -17.650967061519623f, 227.63268850552447f, 206.36152594201434f, 471.985671877861f, 475.98555994033813f,
- 220.36303262998587f, 245.6311809478117f, -17.65064150094986f, 1.6625741124153137f, -11.653848831157461f,
- -4.340179384800379f, -7.997557997703552f, -7.997538924217224f, -4.340202501316128f, -11.653825467617622f,
- 1.662527620792389f, -17.650595128536224f, 243.63101870248772f, 222.36282390460627f, 535.9838808774948f,
- 539.9837689399719f, 252.3656285551697f, 277.62784134173825f, -17.649897634983063f, 1.6633160710334778f,
- -11.653478966905283f, -4.339805568162916f, -7.997252821922302f, -7.997233748435974f, -4.339828684678679f,
- -11.653455603365444f, 1.663269579410553f, -17.649851262569427f, 275.6276790964142f, 254.3654198297901f,
- 567.9829853773117f, 571.9828734397888f, 268.3669265177616f, 293.62617153870156f, -17.649525701999664f,
- 1.6636870503425598f, -11.653294034779236f, -4.339618659844206f, -7.997100234031677f, -7.997081160545349f,
- -4.339641776359969f, -11.653270671239369f, 1.663640558719635f, -17.64947932958603f, 291.6260092933776f,
- 270.366717792382f, 599.9820898771286f, 603.9819779396057f, 284.36822448035355f, 309.6245017356648f,
- -17.649153769016266f, 1.6640580296516418f, -11.653109102653133f, -4.339431751525495f, -7.996947646141052f,
- -7.996928572654724f, -4.33945486804123f, -11.653085739113294f, 1.664011538028717f, -17.64910739660263f,
- 307.62433949034084f, 286.36801575497395f, 631.9811943769455f, 635.9810824394226f, 300.3695224429455f,
- 325.62283193262806f, -17.648781836032867f, 1.6644290089607239f, -11.652924170527058f, -4.339244843206757f,
- -7.996795058250427f, -7.996775984764099f, -4.33926795972252f, -11.65290080698719f, 1.664382517337799f,
- -17.648735463619232f, 323.6226696873041f, 302.3693137175659f, 663.9802988767624f, 667.9801869392395f,
- 316.3708204055374f, 341.6211621295913f, -17.64840990304947f, 1.664799988269806f, -11.652739238400954f,
- -4.3390579348880465f, -7.996642470359802f, -7.996623396873474f, -4.339081051403809f, -11.652715874861116f,
- 1.664753496646881f, -17.648363530635834f, 339.62099988426735f, 318.3706116801578f, 695.9794033765793f,
- 699.9792914390564f, 332.37211836812935f, 357.61949232655456f, -17.64803797006607f, 1.665170967578888f,
- -11.65255430627488f, -4.338871026569308f, -7.996489882469177f, -7.996470808982849f, -4.338894143085071f,
- -11.652530942735012f, 1.6651244759559631f, -17.647991597652435f, 355.6193300812306f, 334.37190964274976f,
- 727.9785078763962f, 731.9783959388733f, 348.3734163307213f, 373.6178225235179f, -17.647666037082672f,
- 1.66554194688797f, -11.652369374148776f, -4.3386841182505975f, -7.996337294578552f, -7.996318221092224f,
- -4.33870723476636f, -11.652346010608937f, 1.6654954552650452f, -17.647619664669037f, 371.61766027819385f,
- 350.3732076053417f});
+ {23.998209f, 27.998096f, -3.6551387f, 21.654558f, -17.65585f, 1.6573805f, -11.656438f, -4.3427963f,
+ -7.9996943f, -7.9996753f, -4.342819f, -11.656415f, 1.657334f, -17.655802f, 19.654396f, -1.6553476f,
+ 55.997314f, 59.9972f, 12.346159f, 37.65289f, -17.655478f, 1.6577513f, -11.656253f, -4.3426094f,
+ -7.9995418f, -7.9995227f, -4.3426323f, -11.65623f, 1.6577048f, -17.65543f, 35.652725f, 14.34595f,
+ 87.996414f, 91.99631f, 28.347458f, 53.65122f, -17.655106f, 1.6581223f, -11.656068f, -4.3424225f,
+ -7.999389f, -7.99937f, -4.3424454f, -11.656045f, 1.6580758f, -17.655058f, 51.65106f, 30.347248f,
+ 119.99552f, 123.99541f, 44.348755f, 69.64955f, -17.654734f, 1.6584934f, -11.655883f, -4.3422356f,
+ -7.9992366f, -7.9992175f, -4.3422585f, -11.65586f, 1.6584469f, -17.654686f, 67.64938f, 46.348545f,
+ 151.99463f, 155.99452f, 60.35005f, 85.64788f, -17.654362f, 1.6588643f, -11.655698f, -4.3420486f,
+ -7.999084f, -7.999065f, -4.3420715f, -11.655675f, 1.6588178f, -17.654314f, 83.64772f, 62.349846f,
+ 183.99373f, 187.99362f, 76.35135f, 101.64621f, -17.65399f, 1.6592352f, -11.655513f, -4.3418617f,
+ -7.9989314f, -7.9989123f, -4.3418846f, -11.65549f, 1.6591887f, -17.653942f, 99.64605f, 78.35114f,
+ 215.99283f, 219.99272f, 92.352646f, 117.64454f, -17.653618f, 1.6596063f, -11.655329f, -4.341675f,
+ -7.998779f, -7.9987597f, -4.3416977f, -11.655305f, 1.6595598f, -17.65357f, 115.64438f, 94.35244f,
+ 279.99106f, 283.99094f, 124.35525f, 149.6412f, -17.652874f, 1.6603482f, -11.654959f, -4.341301f,
+ -7.9984736f, -7.9984546f, -4.341324f, -11.654935f, 1.6603017f, -17.652826f, 147.64104f, 126.355034f,
+ 311.99014f, 315.99005f, 140.35654f, 165.63953f, -17.652502f, 1.6607193f, -11.654774f, -4.341114f,
+ -7.998321f, -7.998302f, -4.341137f, -11.65475f, 1.6606728f, -17.652454f, 163.63937f, 142.35634f,
+ 343.98926f, 347.98914f, 156.35783f, 181.63786f, -17.65213f, 1.6610903f, -11.654589f, -4.340927f,
+ -7.9981685f, -7.9981494f, -4.34095f, -11.654565f, 1.6610438f, -17.652082f, 179.6377f, 158.35764f,
+ 375.98837f, 379.98825f, 172.35915f, 197.63618f, -17.651758f, 1.6614611f, -11.654404f, -4.34074f,
+ -7.998016f, -7.997997f, -4.340763f, -11.65438f, 1.6614146f, -17.65171f, 195.63603f, 174.35893f,
+ 407.98746f, 411.98737f, 188.36044f, 213.63452f, -17.651386f, 1.6618322f, -11.654219f, -4.3405533f,
+ -7.9978633f, -7.997844f, -4.340576f, -11.654196f, 1.6617857f, -17.651339f, 211.63435f, 190.36023f,
+ 439.98657f, 443.98645f, 204.36174f, 229.63286f, -17.651014f, 1.6622032f, -11.654034f, -4.3403664f,
+ -7.9977107f, -7.9976916f, -4.3403893f, -11.654011f, 1.6621567f, -17.650967f, 227.63269f, 206.36153f,
+ 471.98566f, 475.98557f, 220.36304f, 245.63118f, -17.650642f, 1.662574f, -11.653849f, -4.3401794f,
+ -7.997558f, -7.997539f, -4.3402023f, -11.653826f, 1.6625277f, -17.650595f, 243.63101f, 222.36282f,
+ 535.9839f, 539.98376f, 252.36563f, 277.62784f, -17.649899f, 1.6633161f, -11.653479f, -4.3398056f,
+ -7.997253f, -7.997234f, -4.3398285f, -11.653456f, 1.6632696f, -17.64985f, 275.6277f, 254.36542f,
+ 567.983f, 571.98285f, 268.3669f, 293.62616f, -17.649527f, 1.663687f, -11.653294f, -4.3396187f,
+ -7.9971004f, -7.9970813f, -4.3396416f, -11.653271f, 1.6636405f, -17.649479f, 291.626f, 270.36673f,
+ 599.9821f, 603.982f, 284.36823f, 309.6245f, -17.649155f, 1.664058f, -11.65311f, -4.339432f,
+ -7.996948f, -7.9969287f, -4.3394547f, -11.653086f, 1.6640115f, -17.649107f, 307.62433f, 286.368f,
+ 631.9812f, 635.9811f, 300.36954f, 325.62283f, -17.648783f, 1.6644291f, -11.652925f, -4.339245f,
+ -7.996795f, -7.996776f, -4.3392677f, -11.652901f, 1.6643825f, -17.648735f, 323.62268f, 302.36932f,
+ 663.9803f, 667.98016f, 316.37082f, 341.62115f, -17.64841f, 1.6648f, -11.65274f, -4.339058f,
+ -7.9966426f, -7.9966235f, -4.3390813f, -11.652716f, 1.6647534f, -17.648363f, 339.621f, 318.3706f,
+ 695.97943f, 699.9793f, 332.37213f, 357.6195f, -17.648039f, 1.665171f, -11.6525545f, -4.338871f,
+ -7.99649f, -7.996471f, -4.3388944f, -11.652531f, 1.6651244f, -17.647991f, 355.61932f, 334.37192f,
+ 727.9785f, 731.9784f, 348.3734f, 373.61783f, -17.647667f, 1.665542f, -11.6523695f, -4.338684f,
+ -7.9963374f, -7.9963183f, -4.3387074f, -11.652346f, 1.6654955f, -17.64762f, 371.61765f, 350.3732f});
+ test_case.run_with_tolerance_as_fp(1e-3f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_window_no_default_length) {
@@ -1417,38 +469,27 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_complex_input_given_w
0.9044596f});
test_case.add_expected_output<float>(
Shape{2, 4, 10, 2},
- {39.99714946746826f, 44.997006952762604f, -3.8268060472046876f, 36.32573598813075f, -26.390974611367387f,
- 6.3932079238754085f, -17.885399480520576f, -2.113604756384621f, -13.440595214714953f, -6.558716539769538f,
- -9.999701499938965f, -9.999686658382416f, -6.558733350911233f, -13.440578420114413f, -2.1136289848897007f,
- -17.88537512225368f, 6.393153709525318f, -26.390919916754058f, 33.82553601255393f, -1.327069451110034f,
- 159.99372911453247f, 164.9935865998268f, 56.17799336663901f, 96.31941429440245f, -26.389673466965206f,
- 6.3945205945953365f, -17.884817996398652f, -2.113020157979113f, -13.440191747314223f, -6.558313469356559f,
- -9.999345302581787f, -9.999330461025238f, -6.558330280498261f, -13.440174952713676f, -2.113044386484189f,
- -17.88479363813176f, 6.394466380245246f, -26.38961877235188f, 93.81921431882563f, 58.677729962733665f,
- 279.9903087615967f, 284.990166246891f, 116.1827927804827f, 156.31309260067414f, -26.38837232256303f,
- 6.395833265315265f, -17.88423651227673f, -2.1124355595736013f, -13.4397882799135f, -6.557910398943584f,
- -9.99898910522461f, -9.99897426366806f, -6.557927210085282f, -13.439771485312946f, -2.112459788078681f,
- -17.88421215400984f, 6.3957790509651735f, -26.3883176279497f, 153.81289262509733f, 118.68252937657735f,
- 399.9868884086609f, 404.98674589395523f, 176.18759219432638f, 216.30677090694581f, -26.38707117816086f,
- 6.397145936035198f, -17.88365502815482f, -2.1118509611680913f, -13.43938481251277f, -6.557507328530605f,
- -9.998632907867432f, -9.998618066310883f, -6.557524139672296f, -13.43936801791223f, -2.1118751896731798f,
- -17.883630669887918f, 6.397091721685095f, -26.387016483547516f, 213.806570931369f, 178.68732879042108f,
- 519.9834680557251f, 524.9833255410194f, 236.19239160817006f, 276.3004492132175f, -26.385770033758675f,
- 6.398458606755116f, -17.8830735440329f, -2.1112663627625903f, -13.43898134511204f, -6.5571042581176044f,
- -9.998276710510254f, -9.998261868953705f, -6.55712106925931f, -13.438964550511457f, -2.1112905912676663f,
- -17.883049185766005f, 6.398404392405028f, -26.385715339145342f, 273.8002492376407f, 238.69212820426475f,
- 639.9800477027893f, 644.9799051880836f, 296.1971910220138f, 336.2941275194893f, -26.384468889356498f,
- 6.399771277475056f, -17.882492059910966f, -2.1106817643570555f, -13.438577877711282f, -6.556701187704647f,
- -9.997920513153076f, -9.997905671596527f, -6.556717998846352f, -13.438561083110784f, -2.1107059928621457f,
- -17.88246770164406f, 6.399717063124951f, -26.384414194743158f, 333.7939275439124f, 298.6969276181085f,
- 759.9766273498535f, 764.9764848351479f, 356.2019904358574f, 396.28780582576087f, -26.38316774495431f,
- 6.401083948194983f, -17.88191057578905f, -2.1100971659515597f, -13.438174410310552f, -6.556298117291675f,
- -9.997564315795898f, -9.99754947423935f, -6.556314928433352f, -13.438157615710026f, -2.1101213944566375f,
- -17.88188621752216f, 6.401029733844893f, -26.38311305034098f, 393.78760585018404f, 358.70172703195215f,
- 879.9732069969177f, 884.9730644822121f, 416.2067898497012f, 456.2814841320326f, -26.38186660055215f,
- 6.402396618914892f, -17.881329091667133f, -2.109512567546055f, -13.437770942909793f, -6.555895046878646f,
- -9.99720811843872f, -9.997193276882172f, -6.55591185802038f, -13.437754148309267f, -2.1095367960511293f,
- -17.881304733400242f, 6.402342404564804f, -26.381811905938818f, 453.78128415645574f, 418.7065264457958f});
+ {39.99715f, 44.997005f, -3.826806f, 36.325737f, -26.390974f, 6.393208f, -17.885399f, -2.1136048f,
+ -13.440596f, -6.558717f, -9.9997015f, -9.999686f, -6.5587335f, -13.440578f, -2.113629f, -17.885376f,
+ 6.3931537f, -26.39092f, 33.825535f, -1.3270694f, 159.99373f, 164.99359f, 56.177994f, 96.31941f,
+ -26.389673f, 6.3945208f, -17.884817f, -2.1130202f, -13.440192f, -6.5583134f, -9.999345f, -9.9993305f,
+ -6.55833f, -13.440175f, -2.1130445f, -17.884794f, 6.3944664f, -26.389618f, 93.819214f, 58.67773f,
+ 279.9903f, 284.99017f, 116.18279f, 156.3131f, -26.388372f, 6.3958335f, -17.884237f, -2.1124356f,
+ -13.439788f, -6.5579104f, -9.998989f, -9.998974f, -6.557927f, -13.439772f, -2.11246f, -17.884212f,
+ 6.395779f, -26.388317f, 153.8129f, 118.682526f, 399.98688f, 404.98676f, 176.18759f, 216.30678f,
+ -26.387072f, 6.3971457f, -17.883656f, -2.111851f, -13.439384f, -6.5575075f, -9.998633f, -9.998618f,
+ -6.557524f, -13.439368f, -2.1118753f, -17.88363f, 6.397092f, -26.387016f, 213.80656f, 178.68733f,
+ 519.98346f, 524.98334f, 236.1924f, 276.30045f, -26.38577f, 6.3984585f, -17.883074f, -2.1112664f,
+ -13.438981f, -6.557104f, -9.998277f, -9.998261f, -6.5571213f, -13.438965f, -2.1112907f, -17.883049f,
+ 6.3984046f, -26.385715f, 273.80026f, 238.69212f, 639.98004f, 644.9799f, 296.1972f, 336.29413f,
+ -26.384468f, 6.399771f, -17.882492f, -2.1106818f, -13.438578f, -6.556701f, -9.99792f, -9.997906f,
+ -6.556718f, -13.438561f, -2.110706f, -17.882467f, 6.399717f, -26.384415f, 333.7939f, 298.69693f,
+ 759.9766f, 764.9765f, 356.202f, 396.2878f, -26.383167f, 6.401084f, -17.88191f, -2.1100972f,
+ -13.438174f, -6.5562983f, -9.997564f, -9.997549f, -6.556315f, -13.438158f, -2.1101215f, -17.881886f,
+ 6.4010296f, -26.383114f, 393.7876f, 358.70172f, 879.9732f, 884.9731f, 416.2068f, 456.2815f,
+ -26.381866f, 6.4023967f, -17.881329f, -2.1095126f, -13.437771f, -6.555895f, -9.997208f, -9.997193f,
+ -6.555912f, -13.437754f, -2.109537f, -17.881304f, 6.4023423f, -26.381811f, 453.78128f, 418.7065f});
+ test_case.run_with_tolerance_as_fp(1e-3f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_given_window_no_default_length) {
@@ -1458,23 +499,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_given_window_
std::vector<float> signal(ov::shape_size(signal_shape));
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
- test_case.add_input<float>(Shape{16},
- {1.0f,
- 0.96194196f,
- 0.8535616f,
- 0.6913578f,
- 0.5000232f,
- 0.308685f,
- 0.1464712f,
- 0.038075745f,
- 0.0f,
- 0.03804031f,
- 0.1464057f,
- 0.3085994f,
- 0.49993038f,
- 0.6912722f,
- 0.853496f,
- 0.96190655f});
+ test_case.add_input<float>(Shape{16}, stft_window_16);
test_case.add_expected_output<float>(
Shape{2, 3, 9, 2},
{55.996273f, 0.0f, 23.999104f, 24.93398f, -7.99869f, 22.70421f, -7.999475f, 12.814739f,
@@ -1491,6 +516,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_onesided_real_input_given_window_
-7.9994965f, 0.0f, 439.98508f, 0.0f, 215.9964f, 24.916183f, -7.99476f, 22.704206f,
-7.9979024f, 12.814749f, -7.9987793f, 8.329529f, -7.999122f, 5.5011153f, -7.9992967f, 3.391035f,
-7.999382f, 1.6240807f, -7.99942f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-3f);
}
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_2D_onesided_real_input_given_window_no_default_length) {
@@ -1500,23 +526,7 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_2D_onesided_real_input_given_wind
std::vector<float> signal(ov::shape_size(signal_shape));
std::iota(std::begin(signal), std::end(signal), 0.f);
test_case.add_input<float>(signal_shape, signal);
- test_case.add_input<float>(Shape{16},
- {1.0f,
- 0.96194196f,
- 0.8535616f,
- 0.6913578f,
- 0.5000232f,
- 0.308685f,
- 0.1464712f,
- 0.038075745f,
- 0.0f,
- 0.03804031f,
- 0.1464057f,
- 0.3085994f,
- 0.49993038f,
- 0.6912722f,
- 0.853496f,
- 0.96190655f});
+ test_case.add_input<float>(Shape{16}, stft_window_16);
test_case.add_expected_output<float>(
Shape{2, 3, 9, 2},
{55.996273f, 0.0f, 23.999104f, 24.93398f, -7.99869f, 22.70421f, -7.999475f, 12.814739f,
@@ -1533,38 +543,195 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_2D_onesided_real_input_given_wind
-7.9994965f, 0.0f, 439.98508f, 0.0f, 215.9964f, 24.916183f, -7.99476f, 22.704206f,
-7.9979024f, 12.814749f, -7.9987793f, 8.329529f, -7.999122f, 5.5011153f, -7.9992967f, 3.391035f,
-7.999382f, 1.6240807f, -7.99942f, 0.0f});
+ test_case.run_with_tolerance_as_fp(1e-3f);
}
-OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_const_frame_step) {
- try {
- convert_model("stft_non_const_frame_step.onnx");
- FAIL() << "Unknown error during STFT import";
- } catch (const std::runtime_error& exc) {
- std::string msg{exc.what()};
- EXPECT_TRUE(msg.find("frame_step input must be a scalar or Shape{1} constant.") != std::string::npos);
- }
+namespace {
+const std::vector<float> stft_window_16_expected{
+ 55.996273f, 0.0f, 23.999104f, 24.93398f, -7.99869f, 22.70421f, -7.999475f, 12.814739f, -7.999694f,
+ 8.329526f, -7.999781f, 5.5011215f, -7.999824f, 3.3910275f, -7.9998474f, 1.6240749f, -7.999859f, 0.0f,
+ 119.99441f, 0.0f, 55.998657f, 24.931015f, -7.9980354f, 22.704208f, -7.9992137f, 12.814741f, -7.999542f,
+ 8.329527f, -7.9996705f, 5.5011196f, -7.999737f, 3.3910284f, -7.999769f, 1.6240768f, -7.9997787f, 0.0f,
+ 183.99254f, 0.0f, 87.998215f, 24.928047f, -7.9973803f, 22.70421f, -7.9989514f, 12.814744f, -7.9993896f,
+ 8.329525f, -7.999561f, 5.5011206f, -7.999648f, 3.3910275f, -7.9996986f, 1.6240759f, -7.99971f, 0.0f,
+ 311.98883f, 0.0f, 151.99731f, 24.922113f, -7.9960704f, 22.704214f, -7.998431f, 12.814743f, -7.9990845f,
+ 8.329521f, -7.999341f, 5.5011144f, -7.999474f, 3.3910275f, -7.999542f, 1.6240788f, -7.9995728f, 0.0f,
+ 375.98694f, 0.0f, 183.99686f, 24.919151f, -7.9954133f, 22.704203f, -7.9981623f, 12.814751f, -7.998932f,
+ 8.329529f, -7.9992285f, 5.501122f, -7.9993834f, 3.3910313f, -7.9994736f, 1.6240854f, -7.9994965f, 0.0f,
+ 439.98508f, 0.0f, 215.9964f, 24.916183f, -7.99476f, 22.704206f, -7.9979024f, 12.814749f, -7.9987793f,
+ 8.329529f, -7.999122f, 5.5011153f, -7.9992967f, 3.391035f, -7.999382f, 1.6240807f, -7.99942f, 0.0f};
+} // namespace
+
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_non_const_frame_step) {
+ auto model = convert_model("stft_non_const_frame_step.onnx");
+ auto test_case = ov::test::TestCase(model, s_device);
+ const Shape signal_shape{2, 32, 1};
+ std::vector<float> signal(ov::shape_size(signal_shape));
+ std::iota(std::begin(signal), std::end(signal), 0.f);
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<int64_t>(Shape{1}, {8});
+ test_case.add_input<float>(Shape{16}, stft_window_16);
+ test_case.add_expected_output<float>(Shape{2, 3, 9, 2}, stft_window_16_expected);
+ test_case.run_with_tolerance_as_fp(1e-3f);
}
-OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_dynamic_singal_shape) {
- try {
- convert_model("stft_dynamic_signal_shape.onnx");
- FAIL() << "Unknown error during STFT import";
- } catch (const std::runtime_error& exc) {
- std::string msg{exc.what()};
- EXPECT_TRUE(msg.find("Shape of signal input must be static with the rank equal to 3.") != std::string::npos);
- }
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_runtime_frame_length) {
+ auto model = convert_model("stft_runtime_frame_length.onnx");
+ auto test_case = ov::test::TestCase(model, s_device);
+ const Shape signal_shape{1, 20, 1};
+ std::vector<float> signal(ov::shape_size(signal_shape));
+ std::iota(std::begin(signal), std::end(signal), 0.f);
+
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<int64_t>(Shape{}, {6});
+ test_case.add_input<int64_t>(Shape{}, {8});
+ test_case.add_expected_output<float>(
+ Shape{1, 3, 8, 2},
+ {28.0f, 0.0f, -4.0f, 9.656855f, -4.0f, 4.0f, -4.0f, 1.6568543f, -4.0f, 0.0f, -4.0f, -1.6568543f,
+ -4.0f, -4.0f, -4.0f, -9.656855f, 76.0f, 0.0f, -4.0f, 9.656855f, -4.0f, 4.0f, -4.0f, 1.6568543f,
+ -4.0f, 0.0f, -4.0f, -1.6568543f, -4.0f, -4.0f, -4.0f, -9.656855f, 124.0f, 0.0f, -4.0f, 9.656855f,
+ -4.0f, 4.0f, -4.0f, 1.6568543f, -4.0f, 0.0f, -4.0f, -1.6568543f, -4.0f, -4.0f, -4.0f, -9.656855f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
+
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<int64_t>(Shape{}, {5});
+ test_case.add_input<int64_t>(Shape{}, {4});
+ test_case.add_expected_output<float>(
+ Shape{1, 4, 4, 2},
+ {6.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, -2.0f, -2.0f, 26.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, -2.0f, -2.0f,
+ 46.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, -2.0f, -2.0f, 66.0f, 0.0f, -2.0f, 2.0f, -2.0f, 0.0f, -2.0f, -2.0f});
+ test_case.run_with_tolerance_as_fp(1e-4f);
+}
+
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_dynamic_signal_shape) {
+ auto model = convert_model("stft_dynamic_signal_shape.onnx");
+ auto test_case = ov::test::TestCase(model, s_device);
+ const Shape signal_shape{2, 32, 1};
+ std::vector<float> signal(ov::shape_size(signal_shape));
+ std::iota(std::begin(signal), std::end(signal), 0.f);
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<float>(Shape{16}, stft_window_16);
+ test_case.add_expected_output<float>(Shape{2, 3, 9, 2}, stft_window_16_expected);
+ test_case.run_with_tolerance_as_fp(1e-3f);
+}
+
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_complex_dynamic_signal_shape) {
+ auto model = convert_model("stft_complex_dynamic_signal_shape.onnx");
+ auto test_case = ov::test::TestCase(model, s_device);
+ const Shape signal_shape{2, 32, 2};
+ std::vector<float> signal(ov::shape_size(signal_shape));
+ std::iota(std::begin(signal), std::end(signal), 0.f);
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<float>(Shape{16}, stft_window_16);
+ test_case.add_expected_output<float>(
+ Shape{2, 3, 16, 2},
+ {111.992546f, 119.99231f, -1.8693811f, 101.86612f, -61.4058f, 29.411123f, -41.628433f, 9.630561f,
+ -32.658443f, 0.6596847f, -27.001806f, -4.9973054f, -22.781706f, -9.217583f, -19.247847f, -12.751536f,
+ -15.99971f, -15.999701f, -12.751545f, -19.247837f, -9.217593f, -22.781694f, -4.997319f, -27.001793f,
+ 0.6596657f, -32.658424f, 9.630528f, -41.6284f, 29.411041f, -61.40572f, 97.8658f, 2.1301923f,
+ 239.98882f, 247.98859f, 62.135654f, 165.85928f, -61.40449f, 29.412434f, -41.62791f, 9.631088f,
+ -32.65814f, 0.6599904f, -27.001585f, -4.9970865f, -22.781532f, -9.217405f, -19.247698f, -12.751381f,
+ -15.999564f, -15.999556f, -12.7513895f, -19.247688f, -9.217417f, -22.78152f, -4.9971004f, -27.001572f,
+ 0.65997136f, -32.65812f, 9.631056f, -41.62788f, 29.412352f, -61.404408f, 161.85898f, 66.13523f,
+ 367.98508f, 375.98486f, 126.14069f, 229.85246f, -61.40318f, 29.413744f, -41.62739f, 9.631615f,
+ -32.657833f, 0.660296f, -27.001364f, -4.9968677f, -22.781359f, -9.217229f, -19.24755f, -12.751225f,
+ -15.999419f, -15.99941f, -12.751234f, -19.24754f, -9.21724f, -22.781347f, -4.996881f, -27.00135f,
+ 0.660277f, -32.657814f, 9.631582f, -41.627357f, 29.413662f, -61.403095f, 225.85214f, 130.14026f,
+ 623.97766f, 631.9774f, 254.15077f, 357.8388f, -61.40056f, 29.416363f, -41.62635f, 9.632668f,
+ -32.657223f, 0.6609073f, -27.000921f, -4.9964294f, -22.78101f, -9.216876f, -19.247253f, -12.750915f,
+ -15.999128f, -15.999119f, -12.750923f, -19.247244f, -9.2168865f, -22.780998f, -4.9964433f, -27.000908f,
+ 0.6608883f, -32.657204f, 9.632635f, -41.626316f, 29.41628f, -61.400475f, 353.8385f, 258.15033f,
+ 751.97394f, 759.9737f, 318.1558f, 421.83197f, -61.399246f, 29.417673f, -41.625828f, 9.633194f,
+ -32.656918f, 0.661213f, -27.0007f, -4.99621f, -22.780836f, -9.216699f, -19.247105f, -12.750759f,
+ -15.998982f, -15.998974f, -12.750768f, -19.247095f, -9.21671f, -22.780825f, -4.996224f, -27.000687f,
+ 0.66119397f, -32.6569f, 9.633162f, -41.625797f, 29.417591f, -61.399162f, 417.83167f, 322.15536f,
+ 879.97015f, 887.97f, 382.16083f, 485.82516f, -61.397934f, 29.418983f, -41.62531f, 9.633721f,
+ -32.656616f, 0.66151863f, -27.00048f, -4.995991f, -22.78066f, -9.216522f, -19.246956f, -12.750604f,
+ -15.998837f, -15.998828f, -12.750612f, -19.246946f, -9.216533f, -22.780651f, -4.996005f, -27.000465f,
+ 0.6614996f, -32.656597f, 9.633688f, -41.625275f, 29.418901f, -61.397854f, 481.82483f, 386.1604f});
+ test_case.run_with_tolerance_as_fp(1e-3f);
+}
+
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_no_onesided_dynamic_last_dim_real_input) {
+ auto model = convert_model("stft_no_onesided_dynamic_last_dim.onnx");
+ auto test_case = ov::test::TestCase(model, s_device);
+ const Shape signal_shape{2, 32, 1};
+ std::vector<float> signal(ov::shape_size(signal_shape));
+ std::iota(std::begin(signal), std::end(signal), 0.f);
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<float>(Shape{16}, stft_window_16);
+ test_case.add_expected_output<float>(
+ Shape{2, 3, 16, 2},
+ {55.996273f, 0.0f, 23.999105f, 24.93398f, -7.9986897f, 22.70421f, -7.999476f, 12.81474f,
+ -7.9996943f, 8.329527f, -7.999781f, 5.5011215f, -7.999825f, 3.3910282f, -7.999848f, 1.624075f,
+ -7.999855f, 0.0f, -7.999848f, -1.624075f, -7.999825f, -3.3910282f, -7.999781f, -5.5011215f,
+ -7.9996943f, -8.329527f, -7.999476f, -12.81474f, -7.9986897f, -22.70421f, 23.999105f, -24.93398f,
+ 119.99441f, 0.0f, 55.998657f, 24.931015f, -7.9980345f, 22.70421f, -7.999214f, 12.814741f,
+ -7.9995418f, 8.329527f, -7.9996715f, 5.501121f, -7.9997373f, 3.391029f, -7.999772f, 1.6240768f,
+ -7.999782f, 0.0f, -7.999772f, -1.6240768f, -7.9997373f, -3.391029f, -7.9996715f, -5.501121f,
+ -7.9995418f, -8.329527f, -7.999214f, -12.814741f, -7.9980345f, -22.70421f, 55.998657f, -24.931015f,
+ 183.99254f, 0.0f, 87.99821f, 24.92805f, -7.9973793f, 22.70421f, -7.998952f, 12.814743f,
+ -7.999389f, 8.329528f, -7.9995613f, 5.5011206f, -7.9996495f, 3.3910296f, -7.999696f, 1.6240786f,
+ -7.9997096f, 0.0f, -7.999696f, -1.6240786f, -7.9996495f, -3.3910296f, -7.9995613f, -5.5011206f,
+ -7.999389f, -8.329528f, -7.998952f, -12.814743f, -7.9973793f, -22.70421f, 87.99821f, -24.92805f,
+ 311.98883f, 0.0f, 151.99731f, 24.922117f, -7.996069f, 22.70421f, -7.9984283f, 12.814746f,
+ -7.999084f, 8.329528f, -7.999341f, 5.5011196f, -7.999474f, 3.3910308f, -7.999544f, 1.6240822f,
+ -7.999564f, 0.0f, -7.999544f, -1.6240822f, -7.999474f, -3.3910308f, -7.999341f, -5.5011196f,
+ -7.999084f, -8.329528f, -7.9984283f, -12.814746f, -7.996069f, -22.70421f, 151.99731f, -24.922117f,
+ 375.98697f, 0.0f, 183.99687f, 24.919151f, -7.995414f, 22.704208f, -7.9981666f, 12.814748f,
+ -7.9989314f, 8.329528f, -7.9992313f, 5.501119f, -7.9993863f, 3.3910315f, -7.9994683f, 1.624084f,
+ -7.999491f, 0.0f, -7.9994683f, -1.624084f, -7.9993863f, -3.3910315f, -7.9992313f, -5.501119f,
+ -7.9989314f, -8.329528f, -7.9981666f, -12.814748f, -7.995414f, -22.704208f, 183.99687f, -24.919151f,
+ 439.98508f, 0.0f, 215.99641f, 24.916185f, -7.9947586f, 22.704208f, -7.997905f, 12.814749f,
+ -7.998779f, 8.329529f, -7.999121f, 5.5011187f, -7.9992986f, 3.391032f, -7.999392f, 1.6240858f,
+ -7.9994187f, 0.0f, -7.999392f, -1.6240858f, -7.9992986f, -3.391032f, -7.999121f, -5.5011187f,
+ -7.998779f, -8.329529f, -7.997905f, -12.814749f, -7.9947586f, -22.704208f, 215.99641f, -24.916185f});
+ test_case.run_with_tolerance_as_fp(1e-3f);
}
-OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_const_frame_length) {
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_non_scalar_frame_length) {
try {
convert_model("stft_non_const_frame_length.onnx");
FAIL() << "Unknown error during STFT import";
} catch (const std::runtime_error& exc) {
std::string msg{exc.what()};
- EXPECT_TRUE(msg.find("frame_length input must be a scalar or Shape{1} constant.") != std::string::npos);
+ EXPECT_TRUE(msg.find("frame_length input must be a scalar or Shape{1}.") != std::string::npos);
}
}
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_float_frame_step) {
+ OV_EXPECT_THROW(convert_model("stft_float_frame_step.onnx"),
+ ov::Exception,
+ testing::HasSubstr("frame_step input must be of integer type."));
+}
+
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_float_frame_length) {
+ OV_EXPECT_THROW(convert_model("stft_float_frame_length.onnx"),
+ ov::Exception,
+ testing::HasSubstr("frame_length input must be of integer type."));
+}
+
+OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_runtime_frame_length_with_window) {
+ auto model = convert_model("stft_runtime_frame_length_with_window.onnx");
+ auto test_case = ov::test::TestCase(model, s_device);
+ const Shape signal_shape{2, 32, 1};
+ std::vector<float> signal(ov::shape_size(signal_shape));
+ std::iota(std::begin(signal), std::end(signal), 0.f);
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<int64_t>(Shape{}, {8});
+ test_case.add_input<float>(Shape{16}, stft_window_16);
+ test_case.add_input<int64_t>(Shape{}, {16});
+ test_case.add_expected_output<float>(Shape{2, 3, 9, 2}, stft_window_16_expected);
+ test_case.run_with_tolerance_as_fp(1e-3f);
+
+ // ONNX requires window length == frame_length
+ test_case.add_input<float>(signal_shape, signal);
+ test_case.add_input<int64_t>(Shape{}, {8});
+ test_case.add_input<float>(Shape{16}, stft_window_16);
+ test_case.add_input<int64_t>(Shape{}, {32});
+ EXPECT_ANY_THROW(test_case.run());
+}
+
OPENVINO_TEST(${BACKEND_NAME}, onnx_model_stft_proper_exception_if_complex_signal_and_onesided) {
try {
convert_model("stft_onesided_complex_input.onnx");
diff --git a/src/frontends/onnx/tests/runtime/ie/unit_test.manifest b/src/frontends/onnx/tests/runtime/ie/unit_test.manifest
index 7f5055f7121..5f01ab849c3 100644
--- a/src/frontends/onnx/tests/runtime/ie/unit_test.manifest
+++ b/src/frontends/onnx/tests/runtime/ie/unit_test.manifest
@@ -406,3 +406,9 @@ IE_CPU.onnx_model_instance_normalization
IE_CPU.quant_dequant_pattern_axis
IE_CPU/GRUSequenceOp.onnx_model_gru_reverse_mixed_seq_len_const
IE_CPU/RNNSequenceOp.onnx_model_rnn_fwd_bias_initial_h_const
+
+# CVS-195972: CPU IRDFT does not zero-pad input with fewer bins than signal_size / 2 + 1 (reads uninitialized memory)
+IE_CPU.onnx_model_dft_inverse_length_provided_onesided
+
+# CVS-195973: GPU STFT returns nondeterministic wrong frames when frame_step/frame_length are runtime inputs
+IE_GPU.onnx_model_stft_runtime_frame_length
diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.py
index 3f02ef00d53..0b48fe6e27f 100644
--- a/src/frontends/onnx/tests/tests_python/test_backend.py
+++ b/src/frontends/onnx/tests/tests_python/test_backend.py
@@ -305,8 +305,6 @@ tests_expected_to_fail = [
"OnnxBackendNodeModelTest.test_sequence_map_identity_1_sequence_1_tensor_cpu",
"OnnxBackendNodeModelTest.test_sequence_map_identity_1_sequence_cpu",
"OnnxBackendNodeModelTest.test_sequence_map_identity_2_sequences_cpu",
- "OnnxBackendNodeModelTest.test_stft_cpu",
- "OnnxBackendNodeModelTest.test_stft_with_window_cpu",
),
(
xfail_issue_99952,