diff --git a/ngraph/frontend/onnx_import/src/op/softmax.cpp b/ngraph/frontend/onnx_import/src/op/softmax.cpp index 1e632c76fe3f804c219d940214b0f0d511b1c2e1..92b32624b5ff81e97530c09cd676eed533ad062b 100644 --- a/ngraph/frontend/onnx_import/src/op/softmax.cpp +++ b/ngraph/frontend/onnx_import/src/op/softmax.cpp @@ -31,15 +31,7 @@ namespace ngraph const int64_t axis) { const auto coerced_data = ngraph::builder::opset1::flatten(data, axis); - - const auto axis_1 = default_opset::Constant::create(element::i64, Shape{1}, {1}); - const auto max = - std::make_shared<default_opset::ReduceMax>(coerced_data, axis_1, true); - - const auto data_minus_max = - std::make_shared<default_opset::Subtract>(coerced_data, max); - - const auto result = std::make_shared<default_opset::Softmax>(data_minus_max, 1); + const auto result = std::make_shared<default_opset::Softmax>(coerced_data, 1); const auto data_shape = std::make_shared<default_opset::ShapeOf>(data); const bool special_zero = false; return std::make_shared<default_opset::Reshape>(result, data_shape, special_zero); diff --git a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp index 1facfdde27424569b0ee472ea7cd65d1261dbbf5..56447067f163417828c85131e28b58a10dd0b66f 100644 --- a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp +++ b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp @@ -1142,7 +1142,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2) 0.01439711, 0.70979614, 0.16515835, 0.06798343, 0.2957175, 0.17468555, 0.34994439, 0.11166912, 0.03615172, 0.07108136, 0.08527994, 0.44775794, 0.35972905}); - test_case.run(4); + test_case.run(3); } NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_positive_step)