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

Fix some deprecation warnings from PyTorch #3348

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

fmassa
Copy link
Member

@fmassa fmassa commented Feb 4, 2021

Fixes some warnings that showed up in tests, see https://app.circleci.com/pipelines/github/pytorch/vision/6141/workflows/f4504c18-123c-483a-be33-e33b92997f42/jobs/398743 for some examples

The tests that had those warnings were

test/test_transforms_video.py::TestVideoTransforms::test_random_resized_crop_video
  /root/project/env/lib/python3.7/site-packages/torch/nn/functional.py:3463: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.

and

test/test_models_detection_negative_samples.py::Tester::test_forward_negative_sample_retinanet
  /root/project/env/lib/python3.7/site-packages/torch/nn/_reduction.py:42: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
    warnings.warn(warning.format(ret))

Copy link
Contributor

@datumbox datumbox 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 datumbox merged commit 88d18d6 into pytorch:master Feb 4, 2021
@fmassa fmassa deleted the fix-deprecation-warnings branch February 4, 2021 14:12
facebook-github-bot pushed a commit that referenced this pull request Feb 10, 2021
Reviewed By: fmassa

Differential Revision: D26341413

fbshipit-source-id: ce0e3f3f7c69367db105f73dca986bcf0ecab70a
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