Skip to content
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

Inconsistencies between MaxPool, AveragePool, and LpPool specs #2290

Closed
JamesAllingham opened this issue Sep 6, 2019 · 9 comments
Closed
Assignees
Labels
operator Issues related to ONNX operators

Comments

@JamesAllingham
Copy link
Contributor

The MaxPool op has a few attributes that neither AveragePool nor LpPool have (dilations and storage_order). It isn't clear to me why these attributes should be exclusive to MaxPool. Though, to be honest, I'm not really sure what storage_order is for at all :P.

Similarly, LpPool only has auto_pad, kernel_size, and strides in common with AveragePool and MaxPool. It is not clear to me why ceil_mode, and pads should not apply here too.

(On the other hand, I do see why the count_include_pad attribute of AveragePool and the p attribute of LpPool are specific to their ops.)

Can anyone provide some insight here?

@prasanthpul prasanthpul added the operator Issues related to ONNX operators label Sep 9, 2019
@ebarsoum
Copy link
Contributor

ebarsoum commented Nov 7, 2019

storage_order specify if the tensor format is row major or column major, this shouldn't be part of the spec.
Regarding dilation, because if you compute average or norm, should you count the skipped cells or not? We can add an attribute similar to count_include_pad for that, but I am not aware of any model that use dilation with average and LpPool.

@kraiskil
Copy link

I wonder if the storage_order could be removed? Or at least deprecated? It feels like an unnecessary pain to implement in a backend.

@stale
Copy link

stale bot commented Mar 28, 2022

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.

@stale stale bot added the stale label Mar 28, 2022
@stale stale bot closed this as completed Apr 19, 2022
@jcwchen
Copy link
Member

jcwchen commented Apr 21, 2022

Reopen it since this issue still exists.

@jcwchen jcwchen reopened this Apr 21, 2022
@stale stale bot closed this as completed May 12, 2022
@jcwchen jcwchen removed the stale label May 13, 2022
@jcwchen jcwchen reopened this May 13, 2022
@p-wysocki
Copy link
Contributor

I'm working on it.

@p-wysocki
Copy link
Contributor

Related PRs: #4534 and #4533.

@gramalingam
Copy link
Contributor

As a clarification: the storage_order is used in MaxPool to convert the n-tuple of indices (i0, i1, i2, ...) into a single integer for its second output. Since the other pooling ops don't have such an output, it is not relevant for them. It could have been avoided if the output returned the n-tuple of indices (which is what an op like NonZero does). But it's not worth making a compatibility-breaking change to the op at this point.

@p-wysocki
Copy link
Contributor

Most likely final PR (WIP at the time of writing): #4790

Alignment after it gets merged:
image

@p-wysocki
Copy link
Contributor

The last PR has been merged. The current alignment:
image

Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operator Issues related to ONNX operators
Projects
None yet
Development

No branches or pull requests

7 participants