Skip to content

Updates to RoI transforms docs #3645

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

Merged
merged 5 commits into from
Apr 20, 2021
Merged

Updates to RoI transforms docs #3645

merged 5 commits into from
Apr 20, 2021

Conversation

NicolasHug
Copy link
Member

This PR adds some minor edits to the docstrings of the RoI transforms, in particular about the feature map indices in the RoIs tensor which were previously a source of confusion to me

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I think some parts might be a bit misleading now, could you have a look?

@@ -19,23 +19,26 @@ def ps_roi_align(
mentioned in Light-Head R-CNN.

Args:
input (Tensor[N, C, H, W]): input tensor
input (Tensor[N, C, H, W]): The input tensor, i.e. a batch with ``N`` feature maps
Copy link
Member

Choose a reason for hiding this comment

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

This is actually not correct -- N is the batch size, C is the number of feature maps (aka channels)

output_size (int or Tuple[int, int]): the size of the output after the cropping
is performed, as (height, width)
If a single Tensor is passed, then the first column should
contain the index of the corresponding feature map in the batch, i.e. a number in ``[0, N - 1]``.
Copy link
Member

Choose a reason for hiding this comment

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

index of the corresponding element in the batch. I think calling it feature map might be more more confusing

Copy link
Member Author

Choose a reason for hiding this comment

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

ah thanks, I was assuming a feature map was C x H x W for some reason

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks!

@fmassa fmassa merged commit 23a67b3 into pytorch:master Apr 20, 2021
facebook-github-bot pushed a commit that referenced this pull request May 4, 2021
Summary:
* Edited roi transforms docs

* remove incorrect param desc

* Fixed confusion  about feature maps according to comment

Reviewed By: NicolasHug

Differential Revision: D28169142

fbshipit-source-id: ee6abdf6d80b7ba53104aece3abc058ceb35c469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants