Open justinchuby opened 1 year ago
In OnnxScript, the simlar test case is:
ort_inputs = {'input_0': array([], shape=(0, 3, 3), dtype=int64), 'input_1': array([1,1])}
Inside the function, the [1,1]
will be converted to [0, 0, 1, 0, 0, 1]
, so the op.Pad() can recognize.
But here the test case is:
ort_inputs = {'input_0': array([], shape=(0, 3, 3), dtype=int64), 'input_1': array([1, 1, 1, 1, 1, 1])}
In input_1, the first and fourth number should be 0, because input_0's first dimension size is 0. And, 6 numbers for padding value only apply to 4d tensor. No idea why the test case here is different.
Summary
ONNX Runtime raises
[ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Pad node. Name:'_0x57e2840_n19' Status Message: Cannot use 'reflect' mode to pad dimension with a value of 0. Input shape:{0,3,3}
when executing testops_test.TestOutputConsistencyFullGraphCPU.test_output_match_opinfo__nn_functional_reflection_pad2d_constant_cpu_int64
in ONNX ScriptTorchLib
.To recreate this report, use
To reproduce
Full error stack
Environment