diff --git a/onnxruntime/test/python/quantization/test_op_pad.py b/onnxruntime/test/python/quantization/test_op_pad.py index 05736019cd7c8..755c7fae5e3e8 100644 --- a/onnxruntime/test/python/quantization/test_op_pad.py +++ b/onnxruntime/test/python/quantization/test_op_pad.py @@ -548,14 +548,15 @@ def build_pad_model( opset: int = 21, float_type: onnx.TensorProto.DataType = onnx.TensorProto.FLOAT, ) -> onnx.ModelProto: + num_pads_start = 1 input_0 = onnx.helper.make_tensor_value_info("input_0", float_type, (3, 2)) - output_0 = onnx.helper.make_tensor_value_info("output_0", float_type, (3, 4)) + output_0 = onnx.helper.make_tensor_value_info("output_0", float_type, (3, 2 + num_pads_start)) initializers = [] pad_input_names = ["input_0"] attrs = {"mode": mode} - pads_data = np.array([0, 2, 0, 0], dtype=np.int64) # Pad two vals at beginning of axis 1. + pads_data = np.array([0, num_pads_start, 0, 0], dtype=np.int64) # Pad one val at beginning of axis 1. if opset >= 11: initializers.append(onnx.numpy_helper.from_array(pads_data, "pads")) pad_input_names.append("pads")