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

Issue with the wrappers applied on avgpool2d #10

Open
BabaVegato opened this issue Jan 18, 2024 · 2 comments
Open

Issue with the wrappers applied on avgpool2d #10

BabaVegato opened this issue Jan 18, 2024 · 2 comments

Comments

@BabaVegato
Copy link

Hello,

In the code I can see this in wrappers.py for the avgpool2d :

#enforcing symmetric
if self.layer.kernel_size == 2:
assert self.layer.padding == 0
elif self.layer.kernel_size>2:
assert self.layer.kernel_size[0] - 2*self.layer.padding[0] == 1

Knowing that my kernel_size is > 2, I either :
-get an error because my kernel_size is an int, and ints are not subscriptable (kernel_size[0])
-get an error because my kernel_szie is a tuple, and the comparison kernel_size > 2 isn't possible

Am I getting this wrong ?

@AhmedImtiazPrio
Copy link
Owner

Hey @BabaVegato. Looks like a clear mistake from my side. I don't think any of the kernel_size and padding rules are required since the affine params of avgpool is computed using convolutions. Removing these asserts and just adding a symmetric stride assert.

@BabaVegato
Copy link
Author

Thanks a lot for all the work !

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

No branches or pull requests

2 participants