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

UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). #3790

Open
njzjz opened this issue May 16, 2024 · 0 comments
Labels

Comments

@njzjz
Copy link
Member

njzjz commented May 16, 2024

source/tests/pt/model/test_autodiff.py: 2 warnings
source/tests/pt/model/test_forward_lower.py: 1 warning
source/tests/pt/model/test_null_input.py: 2 warnings
source/tests/pt/model/test_permutation.py: 1 warning
source/tests/pt/model/test_rot.py: 2 warnings
source/tests/pt/model/test_smooth.py: 2 warnings
source/tests/pt/model/test_trans.py: 2 warnings
  /opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/torch/utils/_device.py:78: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
    return func(*args, **kwargs)
@njzjz njzjz added the bug label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

1 participant