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

Clarify scaling of ToTensor transform for target masks in the documentation #2507

Merged
merged 2 commits into from Aug 3, 2020

Conversation

Areiser
Copy link

@Areiser Areiser commented Jul 25, 2020

As discussed in #2497 this should clarify that the scope of ToTensor() does not include target image masks, but only input images, because masks will be subject to the [0,1] scaling which is not desired.

I was not sure if I should add a link to the references (https://github.com/pytorch/vision/tree/master/references) and what the format in the documentation should be (absolute/relative link?).

@codecov
Copy link

codecov bot commented Jul 25, 2020

Codecov Report

Merging #2507 into master will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2507      +/-   ##
==========================================
- Coverage   70.60%   70.46%   -0.15%     
==========================================
  Files          94       94              
  Lines        7995     9091    +1096     
  Branches     1272     1663     +391     
==========================================
+ Hits         5645     6406     +761     
- Misses       1947     2223     +276     
- Partials      403      462      +59     
Impacted Files Coverage Δ
torchvision/transforms/transforms.py 80.06% <ø> (+4.02%) ⬆️
torchvision/models/detection/backbone_utils.py 100.00% <0.00%> (ø)
torchvision/transforms/functional.py 81.09% <0.00%> (+0.26%) ⬆️
torchvision/datasets/lsun.py 21.05% <0.00%> (+0.62%) ⬆️
torchvision/transforms/functional_tensor.py 64.91% <0.00%> (+0.70%) ⬆️
torchvision/datasets/fakedata.py 27.90% <0.00%> (+0.98%) ⬆️
torchvision/datasets/semeion.py 34.92% <0.00%> (+1.58%) ⬆️
torchvision/datasets/coco.py 30.88% <0.00%> (+1.61%) ⬆️
torchvision/datasets/usps.py 32.69% <0.00%> (+2.38%) ⬆️
torchvision/datasets/caltech.py 23.35% <0.00%> (+2.42%) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1aef87d...e7f7a66. Read the comment docs.

Copy link
Collaborator

@vfdev-5 vfdev-5 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 @Areiser ! I left a small comment to add a link on references. Otherwise, looks good !

torchvision/transforms/transforms.py Outdated Show resolved Hide resolved
Co-authored-by: vfdev <vfdev.5@gmail.com>
@Areiser
Copy link
Author

Areiser commented Aug 3, 2020

Thanks for adding the link, I committed your change.

@fmassa fmassa merged commit 7fc47ea into pytorch:master Aug 3, 2020
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
…tation (pytorch#2507)

* Clarify scaling of ToTensor transform for target masks in the documentation

* Add link to the segmentation reference

Co-authored-by: vfdev <vfdev.5@gmail.com>

Co-authored-by: vfdev <vfdev.5@gmail.com>
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

3 participants