Skip to content

Commit 571f4e2

Browse files
committed
add comment
1 parent a742de6 commit 571f4e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onnx/reference/ops/op_pool_common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def get_output_shape_explicit_padding(
9393

9494
if ceil_mode:
9595
output_spatial_shape[dim] = int(np.ceil(dim_size))
96+
# NOTE: ensure that the last pooling starts inside the image
9697
if (output_spatial_shape[dim] - 1) * strides_spatial[
9798
dim
9899
] >= input_spatial_shape[dim] + pads[dim]:
@@ -228,7 +229,7 @@ def pool(
228229
strides[i] * shape[i + 2] + (1 + (kernel[i] - 1) * dilations[i]),
229230
dilations[i],
230231
)
231-
if num < x_shape[i + 2] + pads[i] * 2
232+
# if num < x_shape[i + 2] + pads[i] + pads[i + spatial_size]
232233
)
233234
window_vals = np.array(
234235
[window[indices] for indices in itertools.product(elements)]

0 commit comments

Comments
 (0)