Skip to content
Snippets Groups Projects
Unverified Commit 7b786b27 authored by Tianyu Zhao's avatar Tianyu Zhao Committed by GitHub
Browse files

Add `nn.AdaptiveAvgPool1d` and `nn.AdaptiveAvgPool3d` (#5445)


* Generalize 'AdaptiveAvgPool' for 1~3 dims usage

* Implement GPU version

* Enable pooling with larger 'output_size' which is supported by PyTorch

* Add docs for 'AdaptiveAvgPool1d' and 'AdaptiveAvgPool3d'

* Add functional API for 'AdaptiveAvgPoolXd'

* Add 'flow.adaptive_avg_poolxd'

* Add test cases for 'flow.adaptive_avg_poolxd'

* auto format by CI

* Avoid using 'Shape::Count' in for loop

* Change names of compute functions

* Change 'AdaptivePoolNdGradOp' to functor

* Register integer types for CUDA 'adaptive_avg_poolxd' kernel

* Integrate 'adaptive_avg_poolxd' into 'nn.functional.interpolate'

* Correct wrong 'AdaptiveAvgPoolXd' entries

* Add missing 'not None' assertions for 'output_size'

* Support tuple input for 'AdaptiveAvgPool1d'

* Mark TODO for auto testing 'AdaptiveAvgPoolXd'

* Denote return types for 'BackwardOpConfGenFn'

* Combine test classes of 'AdaptiveAvgPoolXd' into one

* Rename 'AvgXXXCompute'

* auto format by CI

* Simplify output shape inference

* Delete the wrong 'if' block

Co-authored-by: default avataroneflow-ci-bot <ci-bot@oneflow.org>
Co-authored-by: default avataroneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
parent 865ae1a0
No related branches found
No related tags found
No related merge requests found
Showing
with 1751 additions and 298 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment