-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
operator MaxPool output tensor shape is ambiguously documented. #2927
Comments
Is there any update on this? I guess since @faxu removed the 'bug' label, this means the 2x2 output size is still the desired correct one? Also since this is what the back end tests for, it seems to be an implicit consensus among back end implementers that automatic padding should be used (despite the |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Why was it closed. Where's the resolution? |
@faxu , I see this bug mentioned there. Doesn't that mean it has to stay open. Are you creating a one large documentation bug for all the operators? |
@srohit0 Thanks for the reminder. I will keep this issue open to let people know it hasn't been fixed yet. stale robot might accidentally close some inactive issues which are still valid. I am trying to reopen them if they haven't been resolved yet. Reopening now. |
Is it Open, If yes then I would work on it. Kindly give insights In which file what I have to change |
You can start from the documentation on which it was filed - https://github.com/onnx/onnx/blob/rel-1.5.0/docs/Operators.md#maxpool LIkely more tests would be added to ensure new behavior. |
Okay, should I clone the master branch or the rel1.5.0 ? |
The main branch will be preferred. The document in this repo and the web version of document will be reflected right after the PR gets merged. Thank you for the contribution! |
Sure @jcwchen |
@titaiwangms @liqunfu was this fixed by #5741? |
Bug Report
Describe the bug
Operator: MaxPool
When attr
ceil_mode
is used with attrstrides
, it can produce more than one output_spatial_shape depending on application of complete/incomplete application of kernel or by changing the padding. MaxPool document is silent on the behavior in that case.Example:
Consider following input tensor X with given attributes
X
shape: 4x4kernel_shape
: 3x3strides
: 2x2ceil_mode
: 1According to the equation given in operator documention (produced below)
output_spatial_shape[i] = ceil((input_spatial_shape[i] + pad_shape[i] - kernel_spatial_shape[i]) / strides_spatial_shape[i] + 1)
is equal to 2x2. But kernel 3x3 can't be complete applied, since it goes out of the input X's shape.
Case 1: Resulting output spatial shape while, honoring padding and complete kernel application:
1x1
Case 2: Resulting output spatial shape while, honoring padding and partial kernel application:
2x2
Case 3: Resulting output spatial shape while, changed padding (from 0,0 to 1,1) and complete kernel application:
2x2
Document must be clear on the behavior, since it affects resulting output tensor and its elements values.
System information
Reproduction instructions
Expected behavior
Operator doc must clarify application of partial/full kernel or modified padding or honor
ceil_mode
attriute.Notes
This bug applies to other operators where
output_spatial_shape
depends onceil_mode
andkernel_shape
The text was updated successfully, but these errors were encountered: