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

[Api2.0] add pixel shuffle class #26071

Merged
merged 19 commits into from
Aug 24, 2020

Conversation

shippingwang
Copy link
Member

@shippingwang shippingwang commented Aug 9, 2020

PR types

New features

PR changes

APIs

Describe

This PR

  • add pixel shuffle functional function and PixelShuffle class
  • support data_format in pixel_shuffle api

@paddle-bot-old
Copy link

paddle-bot-old bot commented Aug 9, 2020

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/__init__.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/layer/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/layer/vision.py Outdated Show resolved Hide resolved


def pixel_shuffle(x, upscale_factor, data_format="NCHW", name=None):
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for duplicated docstrings for functional version, just refer to class doc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, It is the same thing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

literally, just remove the duplicated description (bug keep the args and stuff) and add a reference to the Layer version.

python/paddle/nn/layer/vision.py Show resolved Hide resolved
paddle/fluid/operators/pixel_shuffle_op.cc Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
python/paddle/nn/functional/vision.py Outdated Show resolved Hide resolved
@shippingwang
Copy link
Member Author

shippingwang commented Aug 19, 2020

@willthefrog Codes have been refined after first time reviewing, feel free to re-review while passing tests

Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reply to each comment before making new review request, otherwise it is hard for the reviewer to keep track of the changes

@shippingwang
Copy link
Member Author

please reply to each comment before making new review request, otherwise it is hard for the reviewer to keep track of the changes

Done



def pixel_shuffle(x, upscale_factor, data_format="NCHW", name=None):
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

literally, just remove the duplicated description (bug keep the args and stuff) and add a reference to the Layer version.

willthefrog
willthefrog previously approved these changes Aug 20, 2020
Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@willthefrog willthefrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shippingwang shippingwang merged commit 1f82c0c into PaddlePaddle:develop Aug 24, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants