Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed " #5

Open
maizer2 opened this issue Aug 24, 2022 · 0 comments

Comments

@maizer2
Copy link

maizer2 commented Aug 24, 2022

/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py:3103: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "

solution

Turn off the UserWarring message

torch_utils/misc.py

add this code in torch_utils/misc.py

warnings.filterwarnings(action='ignore')
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant