OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[ONNX FE] CVS-172238 Wrong shape of results produced by ConvTranspose (#32639)
Szymon Gutaja1cb5040e230
diff --git a/src/frontends/onnx/tests/models/conv_transpose_1x3x8x8.prototxt b/src/frontends/onnx/tests/models/conv_transpose_1x3x8x8.prototxtnew file mode 100644index 00000000000..27efe92ad94--- /dev/null+++ b/src/frontends/onnx/tests/models/conv_transpose_1x3x8x8.prototxt@@ -0,0 +1,117 @@+ir_version: 8+producer_name: "onnx-example"+graph {+ node {+ input: "input"+ input: "weights"+ input: "bias"+ output: "output"+ op_type: "ConvTranspose"+ attribute {+ name: "auto_pad"+ s: "SAME_UPPER"+ type: STRING+ }+ attribute {+ name: "kernel_shape"+ ints: 3+ ints: 3+ type: INTS+ }+ attribute {+ name: "strides"+ ints: 2+ ints: 2+ type: INTS+ }+ }+ name: "complex_model"+ initializer {+ dims: 3+ dims: 1+ dims: 3+ dims: 3+ data_type: 1+ float_data: 0.84014213+ float_data: 1.7282453+ float_data: -0.3263198+ float_data: -0.48273504+ float_data: 0.25233305+ float_data: -0.40771398+ float_data: -1.2935431+ float_data: -0.36785364+ float_data: -1.2410039+ float_data: 0.8345059+ float_data: 0.24356616+ float_data: 1.004215+ float_data: -0.81657827+ float_data: -0.67410517+ float_data: 0.4060925+ float_data: 0.65320534+ float_data: -0.8198668+ float_data: -1.4369859+ float_data: -0.117572695+ float_data: -0.8670695+ float_data: 0.49399605+ float_data: -1.0330713+ float_data: -1.787455+ float_data: -0.30436283+ float_data: 0.06804885+ float_data: -0.950185+ float_data: 0.7083448+ name: "weights"+ }+ initializer {+ dims: 1+ data_type: 1+ float_data: 1.3708473+ name: "bias"+ }+ input {+ name: "input"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 1+ }+ dim {+ dim_value: 3+ }+ dim {+ dim_value: 8+ }+ dim {+ dim_value: 8+ }+ }+ }+ }+ }+ output {+ name: "output"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 1+ }+ dim {+ dim_value: 1+ }+ dim {+ dim_value: 16+ }+ dim {+ dim_value: 16+ }+ }+ }+ }+ }+}+opset_import {+ version: 14+}diff --git a/src/frontends/onnx/tests/onnx_import_convpool.in.cpp b/src/frontends/onnx/tests/onnx_import_convpool.in.cppindex e1d201abd21..a6c61ea625b 100644--- a/src/frontends/onnx/tests/onnx_import_convpool.in.cpp+++ b/src/frontends/onnx/tests/onnx_import_convpool.in.cpp@@ -1440,3 +1440,81 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_pads_bias) {157.875f});test_case.run();}++OPENVINO_TEST(${BACKEND_NAME}, onnx_conv_transpose_autopad) {+ const auto model = convert_model("conv_transpose_1x3x8x8.onnx");+ auto test_case = test::TestCase(model, s_device);++ test_case.add_input<float>(+ Shape{1, 3, 8, 8},+ {0.625151098f, 0.596945405f, 0.139096975f, 0.276130885f, 0.00713499123f, 0.0607993789f, 0.0772799626f,+ 0.098484844f, 1.34567487f, 1.26065361f, 2.18789816f, 0.0653471872f, 1.77078462f, 1.35865974f,+ 1.12412751f, 1.16306293f, 1.52882469f, 1.59743035f, 0.0923668891f, 1.24418771f, 0.447759897f,+ 0.206789434f, 0.263984501f, 0.38207826f, 1.03937542f, 2.09021282f, 0.467289686f, 1.86369658f,+ 1.23900259f, 0.384096682f, 0.296756178f, 2.11388206f, 1.25714934f, 0.192125842f, 0.486225724f,+ 1.38173127f, 0.213047206f, 0.124264345f, 0.187946454f, 1.44937944f, 0.385222673f, 0.558024764f,+ 1.00838554f, 0.124311149f, 1.90255845f, 1.11999547f, 0.974563539f, 0.582694709f, 0.531468391f,+ 3.04861355f, 0.285169095f, 1.22178805f, 0.128970414f, 0.566250026f, 0.207558841f, 0.828584075f,+ 0.89728272f, 0.458865613f, 0.844876111f, 1.37122619f, 1.16179717f, 0.920694292f, 1.14122105f,+ 1.79164004f, 1.12682891f, 0.842717826f, 1.87564576f, 0.692874193f, 0.854609072f, 0.118006214f,+ 1.14124298f, 1.92377281f, 0.0637631491f, 0.223139569f, 0.888881445f, 0.53058058f, 0.852253318f,+ 1.32553041f, 0.644229054f, 0.412511975f, 0.000415288785f, 1.32483172f, 0.0566556714f, 0.104107559f,+ 0.204130545f, 0.557883739f, 0.928778589f, 2.15578008f, 1.29505754f, 1.46797705f, 1.22587049f,+ 0.174201131f, 0.917162478f, 0.479762316f, 0.0272906683f, 0.58244282f, 0.104637481f, 0.748023987f,+ 0.389915824f, 0.398318321f, 0.0204038732f, 0.816221416f, 1.15234113f, 0.56337899f, 1.17305529f,+ 0.882097483f, 0.985680401f, 1.11193633f, 0.781882703f, 0.922793448f, 1.66662455f, 0.944629848f,+ 0.172961116f, 0.547528088f, 1.73304665f, 1.14912224f, 1.02735782f, 0.89158535f, 1.65481675f,+ 0.572695494f, 1.31630123f, 0.0261730403f, 0.594345629f, 0.933356583f, 0.238472551f, 0.299513876f,+ 0.158894345f, 0.197219521f, 1.52590966f, 1.35690475f, 0.141676888f, 2.15699768f, 1.94352877f,+ 1.40682673f, 1.04016232f, 0.0508034416f, 0.224050492f, 2.41353512f, 0.352399886f, 1.54169703f,+ 0.575035036f, 0.148580253f, 0.541164219f, 0.982789278f, 0.893933475f, 0.430977315f, 0.426253587f,+ 1.35645676f, 1.1283102f, 1.80685508f, 1.7404393f, 0.435301125f, 0.270964503f, 1.02027822f,+ 2.35678649f, 1.50359774f, 0.175944671f, 1.42923343f, 0.51326853f, 1.76939189f, 0.409514606f,+ 0.098843053f, 1.47446668f, 1.30807877f, 0.258639991f, 0.16241923f, 1.01321244f, 0.661336064f,+ 1.56858552f, 0.324210107f, 0.276222378f, 0.283114731f, 0.528313696f, 0.657391787f, 0.718641877f,+ 0.193789124f, 0.694960773f, 1.91718662f, 0.33368668f, 1.39595342f, 1.22667146f, 2.16012883f,+ 0.930284202f, 0.264723539f, 0.833213866f, 0.346019775f, 0.542626441f, 0.751732051f, 0.824235022f,+ 0.240106314f, 0.243192792f, 1.26579654f});++ test_case.add_expected_output<float>(+ Shape{1, 1, 16, 16},+ {2.6570032f, 1.4026494f, 4.097457f, 1.4312422f, 4.358069f, 1.9452412f, 3.8355894f,+ 0.14656305f, 3.5327482f, -0.09384227f, 3.1709785f, 0.2848494f, 3.059483f, 0.88048124f,+ 4.6876864f, 1.9655691f, -1.4274524f, -1.9585024f, -1.2689599f, -1.4720103f, -0.6884266f,+ -0.11167741f, -0.89471614f, -2.882082f, -1.8259774f, -2.6774187f, -0.4556129f, -1.2079989f,+ -1.0779876f, -1.2382134f, -0.18473399f, 0.00806427f, 2.5595012f, 0.91405666f, 0.6244595f,+ -0.68860304f, 4.978584f, 3.3394523f, -0.48534f, -2.4429312f, 5.646074f, 1.5901803f,+ 4.397019f, 2.4571092f, 5.218195f, 1.0488592f, 3.2577524f, 0.9674945f, 0.43771517f,+ 1.2669424f, -2.5042286f, -2.7755532f, -1.9331845f, 0.69382787f, -1.3249675f, -1.7260445f,+ -1.0543696f, 0.21531725f, -1.0718178f, 0.55455464f, -0.31781197f, 0.25291705f, -0.90415967f,+ -0.37044144f, 0.8667301f, 2.4778519f, 0.78733087f, 1.1406101f, 0.06660879f, -0.6937479f,+ -0.79506147f, 0.44638246f, 0.70710737f, -0.68043125f, -1.4824747f, -1.430282f, -0.9336823f,+ -0.91168797f, 2.0403967f, 0.47893757f, -0.29100597f, 0.15847456f, -1.8225821f, 0.11050332f,+ 0.5951805f, 0.59405357f, -0.8604816f, -0.8099879f, -1.055466f, -0.67057717f, -1.4942209f,+ -2.1827173f, -1.7207037f, -2.299592f, -1.2838408f, -0.76404536f, 1.3764476f, 1.8355037f,+ 2.890913f, 2.3728309f, 0.17107165f, -0.0519259f, 3.8047943f, 1.4985598f, 2.3641415f,+ 2.1788077f, 2.6996064f, -1.3380355f, 3.250296f, -1.0669993f, 4.1230874f, 1.3102139f,+ -0.46833718f, 0.27577424f, -1.8712362f, -0.9149951f, -2.8570867f, -3.5502553f, -1.6344188f,+ -0.9639236f, -1.3047136f, 0.7507315f, -0.86908996f, -1.410333f, 0.27828562f, 0.5098876f,+ -2.219245f, -1.6510864f, 1.9861047f, 1.5123394f, -2.5923595f, -1.1425136f, -0.95536673f,+ -2.388658f, 0.80486345f, 0.46455407f, -0.35799634f, 0.14485347f, -0.60110354f, -0.24908698f,+ 2.7458048f, 0.47857296f, 2.2998524f, 0.5031518f, 0.2554748f, 0.8855421f, -0.02953649f,+ 0.7384027f, -0.51014626f, -1.4048489f, -1.4614314f, -0.8871366f, 0.18441951f, 0.9485445f,+ 0.3192644f, 0.5616672f, -0.4762156f, -1.1695982f, -0.38912475f, 0.17468858f, 0.95902777f,+ 0.0249002f, 3.191238f, 1.4911141f, 2.3547568f, 1.2146041f, 1.6097362f, -0.46672237f,+ 3.1703544f, 4.050436f, 3.7028737f, 2.091999f, 3.748374f, 0.8613107f, 1.7032791f,+ 0.81649125f, -1.3934654f, -2.1264868f, -0.11187541f, 0.33751798f, -0.17415702f, 0.46710902f,+ 0.01545f, 0.14659834f, -0.41714227f, 0.3795176f, -1.2214614f, -0.14365876f, -1.4849302f,+ -0.7912582f, 0.1787306f, 0.53471124f, 2.2546692f, -0.8649975f, 3.3309882f, 3.8740916f,+ 1.1473688f, 0.5549442f, 3.116909f, 1.325516f, 0.17125642f, -1.0625385f, 0.02054965f,+ -1.0995616f, 2.2210755f, -1.0817534f, 1.3485643f, 1.5398469f, 0.2551086f, 0.14614928f,+ -2.8864846f, -1.6558629f, -2.1308398f, -0.3219006f, -1.1134721f, -1.5906883f, -1.253935f,+ -1.4817764f, -1.8708516f, -2.9484243f, -1.5679508f, -1.3551403f, 0.5339719f, 0.7206881f,+ 2.5979834f, 1.5220752f, -0.69305575f, -1.5217942f, 0.13409078f, 0.66243625f, 0.45986307f,+ 0.5982121f, 1.7192272f, 0.666829f, 1.8630754f, -0.16500485f, 2.9745436f, 0.8539709f,+ 0.14285994f, 2.3918753f, -0.9979347f, -0.7793964f, 0.68560743f, 0.8504962f, -0.36467838f,+ 0.21346569f, -1.098107f, -0.2560147f, -0.6450561f, 0.02996862f, -0.19393313f, 0.97208583f,+ 0.11212575f, 1.1170075f, -1.437528f, -0.57256365f});++ test_case.run_with_tolerance_as_fp(0.00001f);+}