Skip to content

The description of returned tensor's size in ps_roi_pool.py and ps_roi_align.py are wrong #3846

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

Closed
chengjuzhou opened this issue May 17, 2021 · 2 comments

Comments

@chengjuzhou
Copy link
Contributor

chengjuzhou commented May 17, 2021

📚 Documentation

The size of returned tensor should be

[K, C/(output_size[0]*output_size[1]), output_sizep[0], output_size[1]]

in
https://github.com/pytorch/vision/blob/master/torchvision/ops/ps_roi_align.py#L42
and
https://github.com/pytorch/vision/blob/master/torchvision/ops/ps_roi_pool.py#L36

This can be verified from
https://github.com/pytorch/vision/blob/master/test/test_ops.py#L186
and
https://github.com/pytorch/vision/blob/master/test/test_ops.py#L390

@datumbox
Copy link
Contributor

@chengjuzhou Good spot, thanks for flagging it!

Would you like to send us a PR that fixes this?

@fmassa
Copy link
Member

fmassa commented May 17, 2021

Fixed in #3849, thanks @chengjuzhou !

@fmassa fmassa closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants