From 8a0482d3458636851380a495baad50d366a6325e Mon Sep 17 00:00:00 2001 From: Chun-Wei Chen Date: Fri, 4 Sep 2020 16:48:22 -0700 Subject: [PATCH] fix the old one as well --- docs/Changelog.md | 2 +- onnx/defs/nn/old.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 1f241021ccb..eb45f9560e7 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -619,7 +619,7 @@ This version of the operator has been available since version 1 of the default O output_shape can also be explicitly specified in which case pads values are auto generated using these equations: total_padding[i] = stride[i] * (input_size[i] - 1) + output_padding[i] + ((kernel_shape[i] - 1) * dilations[i] + 1) - output_shape[i] - If (auto_pads != SAME_UPPER): pads[start_i] = total_padding[i]/2; pads[end_i] = total_padding[i] - (total_padding[i]/2) + If (auto_pads == SAME_UPPER): pads[start_i] = total_padding[i]/2; pads[end_i] = total_padding[i] - (total_padding[i]/2) Else: pads[start_i] = total_padding[i] - (total_padding[i]/2); pads[end_i] = (total_padding[i]/2). diff --git a/onnx/defs/nn/old.cc b/onnx/defs/nn/old.cc index 37e7b4a976b..16651e4cbd3 100644 --- a/onnx/defs/nn/old.cc +++ b/onnx/defs/nn/old.cc @@ -1362,7 +1362,7 @@ If the pads parameter is provided the shape of the output is calculated via the output_shape can also be explicitly specified in which case pads values are auto generated using these equations: total_padding[i] = stride[i] * (input_size[i] - 1) + output_padding[i] + ((kernel_shape[i] - 1) * dilations[i] + 1) - output_shape[i] - If (auto_pads != SAME_UPPER): pads[start_i] = total_padding[i]/2; pads[end_i] = total_padding[i] - (total_padding[i]/2) + If (auto_pads == SAME_UPPER): pads[start_i] = total_padding[i]/2; pads[end_i] = total_padding[i] - (total_padding[i]/2) Else: pads[start_i] = total_padding[i] - (total_padding[i]/2); pads[end_i] = (total_padding[i]/2). )DOC";