Skip to content

Conversation

ssnl
Copy link
Contributor

@ssnl ssnl commented Nov 6, 2020

While this doesn't matter in most cases where the image is quantized to [0,255] afterwards, it still is not a faithful de-normalization. It is a simple change to make it use clamp instead.

While this doesn't matter in most cases where the images is quantized to [0,255] afterwards, it still is not a faithful de-normalization. It is a simple change to make it use clamp instead.
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Nov 6, 2020

@ssnl thanks for the PR. Seems like related tests are failing: https://app.circleci.com/pipelines/github/pytorch/vision/4909/workflows/a919c232-bf9d-4125-a296-61154c5851f1/jobs/300230

@fmassa
Copy link
Member

fmassa commented Nov 6, 2020

Time for changing the min / max (terrible) variable names to something that doesn't shadow the builtins?

@ssnl
Copy link
Contributor Author

ssnl commented Nov 6, 2020

Haha, I didn't realize that. Fixed now. Thanks @vfdev-5 and @fmassa!

@codecov
Copy link

codecov bot commented Nov 6, 2020

Codecov Report

Merging #2967 (46ffbf1) into master (4738267) will increase coverage by 0.61%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2967      +/-   ##
==========================================
+ Coverage   73.43%   74.05%   +0.61%     
==========================================
  Files          99       99              
  Lines        8813     9076     +263     
  Branches     1391     1448      +57     
==========================================
+ Hits         6472     6721     +249     
- Misses       1916     1922       +6     
- Partials      425      433       +8     
Impacted Files Coverage Δ
torchvision/utils.py 67.85% <100.00%> (ø)
torchvision/datasets/folder.py 85.71% <0.00%> (+0.17%) ⬆️
torchvision/models/detection/anchor_utils.py 92.30% <0.00%> (+0.20%) ⬆️
torchvision/models/shufflenetv2.py 89.05% <0.00%> (+3.00%) ⬆️
torchvision/transforms/functional_tensor.py 77.75% <0.00%> (+3.60%) ⬆️
torchvision/models/densenet.py 88.42% <0.00%> (+5.60%) ⬆️

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 4738267...46ffbf1. Read the comment docs.

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 a lot Simon!

@fmassa fmassa merged commit 8fb1545 into master Nov 9, 2020
@fmassa fmassa deleted the SsnL-patch-1 branch November 9, 2020 10:43
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* make_grid should not avoid DBZ by adding eps

While this doesn't matter in most cases where the images is quantized to [0,255] afterwards, it still is not a faithful de-normalization. It is a simple change to make it use clamp instead.

* fix max/min shadowing
vfdev-5 pushed a commit to Quansight/vision that referenced this pull request Dec 4, 2020
* make_grid should not avoid DBZ by adding eps

While this doesn't matter in most cases where the images is quantized to [0,255] afterwards, it still is not a faithful de-normalization. It is a simple change to make it use clamp instead.

* fix max/min shadowing
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.

4 participants