Skip to content

Conversation

@kevinbchen
Copy link
Contributor

Summary:
When converting pixel_shuffle to reshape + transpose + reshape, the first reshape should
be:
[N, C * r^2, H, W] => [N, C, r, r, H, W]
in order to match pytorch's implementation (see ATen PixelShuffle.cpp).

This previously wasn't caught by the test case, since it uses C = r = 4. Updated test case to
have C = 2, r = 4.

Differential Revision: D15700945

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@kevinbchen is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Summary:
When converting pixel_shuffle to reshape + transpose + reshape, the first reshape should
be:
[N, C * r^2, H, W] => [N, C, r, r, H, W]
in order to match pytorch's implementation (see ATen PixelShuffle.cpp).

This previously wasn't caught by the test case, since it uses C = r = 4. Updated test case to
have C = 2, r = 4.
Pull Request resolved: pytorch#21486

Reviewed By: houseroad

Differential Revision: D15700945

Pulled By: houseroad

fbshipit-source-id: 9b8c7b80678cdf7034891fd9fc4a5b3a5e143d92
@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in f87d5cc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: onnx Related to torch.onnx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants