Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
titaiwangms committed Jan 22, 2025
1 parent a742de6 commit 571f4e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onnx/reference/ops/op_pool_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def get_output_shape_explicit_padding(

if ceil_mode:
output_spatial_shape[dim] = int(np.ceil(dim_size))
# NOTE: ensure that the last pooling starts inside the image
if (output_spatial_shape[dim] - 1) * strides_spatial[
dim
] >= input_spatial_shape[dim] + pads[dim]:
Expand Down Expand Up @@ -228,7 +229,7 @@ def pool(
strides[i] * shape[i + 2] + (1 + (kernel[i] - 1) * dilations[i]),
dilations[i],
)
if num < x_shape[i + 2] + pads[i] * 2
# if num < x_shape[i + 2] + pads[i] + pads[i + spatial_size]
)
window_vals = np.array(
[window[indices] for indices in itertools.product(elements)]
Expand Down

0 comments on commit 571f4e2

Please sign in to comment.