Resize op test update to opset 13#3361
Resize op test update to opset 13#3361postrational merged 4 commits intoonnx:masterfrom tomdol:resize_downsample_test_adjustments
Conversation
…pset 13 Signed-off-by: tomdol <tomasz.dolbniak@intel.com>
|
@jcwchen could you please verify this updated test using ONNX Runtime? |
Yes, they pass ORT backend test and onnx.checker. Thanks. |
|
@tomdol: We see some failures after updating ONNX in ONNX runtime, and I found it's because some tensors have duplicate names: test_resize_downsample_sizes_nearest_tf_half_pixel_for_nn\test_data_set_0\ input_0.pb - Tensor "X", datatype: float32, dimensions: 1,1,4,4, (64 bytes): 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 Can this be fixed, updating the name in "input_1.pb" to "roi"? I'll just disable that test in meantime. Thanks. |
|
@fdwr will do, sorry I missed that. I'll let you know when the PR is ready. |
|
@fdwr I've re-checked the test and it looks correct to me. The tested model expects the "X" and "sizes" inputs to be passed in. "roi" and "scales" are set to empty strings according to the documentation to indicate that they are optional and should be disregarded for this model. The input data in The input names match the operator's input names in the model. Can you please verify on your end? |
|
@tomdol : Sorry for the false alarm 😞. Our test copies the new data, but the copying script left behind the existing old tensors which were deleted in your PR (as this test case was updated inline). The test passes now after wiping the directory 😅. Thanks for your change - it was kinda silly before that the tensor was empty. 👍 |
The changes in this PR are about one of the Resize op tests:
test_resize_downsample_sizes_nearest_tf_half_pixel_for_nnThe current version of this test uses a model with opset_import=11. Given the specification of opset 11 for Resize the model isn't entirely correct. Only one of the last two inputs of Resize should be specified but in the model both are connected to the respective graph inputs.
scalesinput is not optional in opset 11 and the test relies on the values ofsizes. The workaround in the current version of the test is that thescalesinput is connected to a graph input with a zero-dimension. There's also a corresponding input value in the test's directory containing an empty array. A similar trick was applied to the non-optionalroiinput which is supposed to be ignored in this test because of the coordinate transformation mode.I propose the following changes to the test:
roiandscalesinputs in the test model to empty strings because they do not affect this test - this way the op will be given to relevant inputstest_data_set_0/input_1.pbandtest_data_set_0/input_1.pbtest_data_set_0/input_3.pbtotest_data_set_0/input_1.pb- this way the test runner will provide 2 input values to an operator with 2 inputs