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

Fixed torch randint incoherent sampling (compatible to random.randint) #2401

Merged
merged 1 commit into from Jul 7, 2020

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Jul 7, 2020

Description:

  • Fixed torch randint incoherent sampling (compatible to random.randint)

Code with random.randint:

i = random.randint(0, h - th)
j = random.randint(0, w - tw)
i = random.randint(0, img_h - h)
j = random.randint(0, img_w - w)

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!

@codecov
Copy link

codecov bot commented Jul 7, 2020

Codecov Report

Merging #2401 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2401   +/-   ##
=======================================
  Coverage   70.65%   70.65%           
=======================================
  Files          94       94           
  Lines        7897     7897           
  Branches     1241     1241           
=======================================
  Hits         5580     5580           
  Misses       1934     1934           
  Partials      383      383           
Impacted Files Coverage Δ
torchvision/transforms/transforms.py 76.02% <100.00%> (ø)

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 86b6c3e...88c4a27. Read the comment docs.

@fmassa fmassa merged commit b572d5e into pytorch:master Jul 7, 2020
@vfdev-5 vfdev-5 deleted the vfdev-5/fix-torch-randint branch July 7, 2020 14:27
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

2 participants