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
Support for adaptive average pooling? #121
Comments
This is something I'd be happy to accept a PR on. |
@patrick-kidger I'll definitely take a look at this. I'll first try to work on AdaptiveAvgPool1d and then make my way to 2d and 3d. Do you have any resources at hand regarding this? If not, don't worry, I found a Stack Overflow discussion (link) and will use it as a starting point. |
I don't know of any resources I'm afraid. Good luck! |
I tried out a simple implementation for AdaptiveAvgPool1d to make sure that the overall working is correct.
At the moment I don't see how |
At first glance this looks mostly reasonable! Indeed the iteration looks quite expensive; I suspect that will be quite slow at runtime. Perhaps it may be possible to group If necessary then I don't think it's important we exactly match PyTorch here, so for example we could e.g. put all the shorter pieces on the left of A few nits: (1) it'd be best to only support a single dimensionality for |
Agreed, there's no requirement to closely follow Pytorch implementation. I have added an extra check to make sure |
This looks pretty good. Do you want to open a PR for this? (There's a few nits I'll comment on, but I'll do that in the PR rather than here.) |
Merged in v0.5.6 |
Hi again,
I was trying out equinox for some computer vision experiments and found that at the moment there is no support for adaptive average pooling. A similar functionality exists in Pytorch. So I just wanted to check if it is something you intend to add later.
Thanks.
The text was updated successfully, but these errors were encountered: