Skip to content

Fix a bug and document RandomZoomOut #5278

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 2 commits into from
Jan 25, 2022
Merged

Conversation

datumbox
Copy link
Contributor

While investigating a user question in relation to the RandomZoomOut transform at #3403 (comment), I noticed that the torch.rand(1) check is flipped the other way around. It had no effects on the training of SSD because we use p=0.5 but the bug needs to be fixed.

Moreover I've added a comment to explain why an extra bit is necessary on the transform. I think the comment is necessary since I also have forgotten why the extra code is necessary and almost removed it.

@facebook-github-bot
Copy link

facebook-github-bot commented Jan 25, 2022

💊 CI failures summary and remediations

As of commit 66bc73a (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

1 failure not recognized by patterns:

Job Step Action
CircleCI binary_linux_conda_py3.7_cu111 packaging/build_conda.sh 🔁 rerun

1 job timed out:

  • binary_linux_conda_py3.7_cu111

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @datumbox

Copy link
Contributor

@jdsgomes jdsgomes left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

datumbox added a commit to datumbox/yolov5-rt-stack that referenced this pull request Jan 25, 2022
@datumbox
Copy link
Contributor Author

@xiaohu2015 Sorry for getting ages to answer your question at #3403 (comment). I had to catch up with other things and forgot to check. This extra bit is indeed needed; I've added it to get around the limitation of PyTorch pad, which only accept integers for the fill value and thus the extra code ensures we end up with the background colour we asked. This is only needed when the image is Tensor as PIL already supports multi-colour fill.

@datumbox datumbox linked an issue Jan 25, 2022 that may be closed by this pull request
@datumbox datumbox merged commit fccc586 into pytorch:main Jan 25, 2022
@datumbox datumbox deleted the bugfix/zoomout branch January 25, 2022 13:36
zhiqwang pushed a commit to zhiqwang/yolort that referenced this pull request Jan 25, 2022
facebook-github-bot pushed a commit that referenced this pull request Feb 3, 2022
Summary: Bug fix

Reviewed By: kazhang

Differential Revision: D33927496

fbshipit-source-id: 86d101f32a1bd3ba23e16f4ab102d1635265cf45
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.

A question about the RandZoomOut
4 participants