We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a742de6 commit 571f4e2Copy full SHA for 571f4e2
onnx/reference/ops/op_pool_common.py
@@ -93,6 +93,7 @@ def get_output_shape_explicit_padding(
93
94
if ceil_mode:
95
output_spatial_shape[dim] = int(np.ceil(dim_size))
96
+ # NOTE: ensure that the last pooling starts inside the image
97
if (output_spatial_shape[dim] - 1) * strides_spatial[
98
dim
99
] >= input_spatial_shape[dim] + pads[dim]:
@@ -228,7 +229,7 @@ def pool(
228
229
strides[i] * shape[i + 2] + (1 + (kernel[i] - 1) * dilations[i]),
230
dilations[i],
231
)
- if num < x_shape[i + 2] + pads[i] * 2
232
+ # if num < x_shape[i + 2] + pads[i] + pads[i + spatial_size]
233
234
window_vals = np.array(
235
[window[indices] for indices in itertools.product(elements)]
0 commit comments