-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Change misleading MaxUnpool2d example to better demonstrate output_size usage #68936
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
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit ebf902f (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, just tiny nits :) Thanks for the update!
torch/nn/modules/pooling.py
Outdated
>>> input = torch.torch.tensor([[[[ 1., 2, 3, 4, 5], | ||
[ 6, 7, 8, 9, 10], | ||
[11, 12, 13, 14, 15], | ||
[16, 17, 18, 19, 20]]]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nit: for consistency, please add decimal points for all numbers
torch/nn/modules/pooling.py
Outdated
tensor([[[[ 0., 0., 0., 0., 0.], | ||
[ 0., 7., 0., 9., 0.], | ||
[ 0., 0., 0., 0., 0.], | ||
[ 0., 17., 0., 19., 0.]]]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI the linter is complaining about trailing spaces on this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@jbschlosser has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
At #68873, @jbschlosser states that maxunpool2d with the
output_size
argument only works for indices of the same size. This makes sense, but unfortunately it's not what's shown in the example! I've removed the wrong example and replaced it with one where specifyingoutput_size
is actually necessary -- the unpool call fails without it.