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

Mvit code error[Bug] #2446

Closed
3 tasks done
commandermsv opened this issue May 2, 2023 · 1 comment
Closed
3 tasks done

Mvit code error[Bug] #2446

commandermsv opened this issue May 2, 2023 · 1 comment
Assignees

Comments

@commandermsv
Copy link

Branch

main branch (1.x version, such as v1.0.0, or dev-1.x branch)

Prerequisite

Environment

While training mvit-base-p244_32x3x1_kinetics400-rgb.py, I'm continuously getting this below msg,

/mmaction2/mmaction/models/utils/blending_utils.py:151: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').

Describe the bug

While training mvit-base-p244_32x3x1_kinetics400-rgb.py, I'm continuously getting this below msg,

/mmaction2/mmaction/models/utils/blending_utils.py:151: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').

How to solve this?

Reproduces the problem - code sample

No response

Reproduces the problem - command or script

No response

Reproduces the problem - error message

No response

Additional information

No response

@Dai-Wenxun
Copy link
Collaborator

This warning message is indicating that the usage of floordiv function in the code is deprecated in PyTorch, and that it will have a different behavior in a future version of PyTorch. Currently, floordiv function rounds towards zero, which can cause incorrect rounding for negative values.

Use torch.div(a, b, rounding_mode='trunc') instead of floordiv, which will provide the same behavior as floordiv in the current version of PyTorch.

We fix this warning in #2449.

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

No branches or pull requests

2 participants