This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Average pool with padding calculation different from TF and Pytorch #10194
Labels
Comments
I remember we've discussed it before but cannot find the issue now... |
@sxjscience do we know if we are planning to change logic similar to other frameworks? |
I think it will break lots of pretrained models. We'd better keep the current implementation. Need to ask @piiswrong |
Is the following proposed solution okay? - to add a ‘padding_convention’ flag so that the operator will ignore the padded values when the flag is set. This is one way to fix the discrepancy without breaking any existing pre-trained models. |
6 tasks
@spidydev @nswamy please close this issue as it has been addressed. documentation for the change - https://mxnet.incubator.apache.org/api/python/ndarray/ndarray.html?highlight=poolin#mxnet.ndarray.Pooling |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Comparing avg pool behavior on mxnet vs Tendorflow/pytorch , seems like when we calculate the avgpool , we count the padding values while taking mean.
MXNET:
Tensor Flow :
Looking closely at the first kernel window with padding:
Is this behavior by design?
Although this seems incorrect , as avg value will be less than actual mean of the data.
@nswamy @anirudhacharya @sandeep-krishnamurthy @lupesko
The text was updated successfully, but these errors were encountered: