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

Create additional pooling layers #1224

Closed
2 tasks done
dnabanita7 opened this issue Jun 13, 2020 · 6 comments
Closed
2 tasks done

Create additional pooling layers #1224

dnabanita7 opened this issue Jun 13, 2020 · 6 comments

Comments

@dnabanita7
Copy link
Contributor

dnabanita7 commented Jun 13, 2020

This issue is in for better co-ordination of the FluxModels.jl which can be used as a benchmark for Flux.jl. As explained by @darsnack in this issue, I will be creating the following pooling layers.

  • AdaptiveMeanPool
  • AdaptiveMaxPool
@darsnack
Copy link
Member

Great! A couple of notes:

@dnabanita7
Copy link
Contributor Author

Oh, I should remove AvgPool then.

@darsnack
Copy link
Member

And probably want to name the layer AdaptiveMeanPool for consistency.

@dnabanita7
Copy link
Contributor Author

shall i make required changes in the NNlib.jl and create adaptivemaxpool and adaptivemeanpool backends too? I will add two functions there only.

@darsnack
Copy link
Member

I don’t think that’s necessary. Adaptive pooling does the same operation as regular pooling except that the filter window is adjusted dynamically to account for input image size.

The pooling functions in NNlib.jl accept a PoolDims object. Your layers in Flux should create this object based on the desired output size when layer(x) is called. Then pass that object to NNlib.

bors bot added a commit that referenced this issue Jun 30, 2020
1239: add adaptive pool r=CarloLucibello a=dnabanita7

I have added ``AdaptiveMaxPool`` and ``AdaptiveMeanPool`` so that we can do a similar [PyTorch implementation](darsnack/FluxModels.jl#1 (comment)). cc @darsnack 

### PR 

- [x] Tests are added
- [x] Entry in NEWS.md
- [x] Documentation, if applicable
- [ ] Final review from `@MikeInnes` or `@dhairyagandhi96` (for API changes).

### Flux issue linking
[Flux#1224](#1224)
### MLH issue linking
[0.3.x-projects#26](https://github.com/MLH-Fellowship/0.3.x-projects/issues/26)

Co-authored-by: Nabanita Dash <dashnabanita@gmail.com>
@avik-pal
Copy link
Member

avik-pal commented Jul 1, 2020

Fixed by #1239

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

3 participants