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

SKAttention似乎有点小问题 #92

Open
AAAAADA opened this issue Nov 14, 2022 · 1 comment
Open

SKAttention似乎有点小问题 #92

AAAAADA opened this issue Nov 14, 2022 · 1 comment

Comments

@AAAAADA
Copy link

AAAAADA commented Nov 14, 2022

单运行./model/attention/SKAttention.py时会报错,RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
目测应该是第40行U=sum(conv_outs)中调用sum时需要将tensor转numpy,而被转tensor参与梯度计算不能直接转?

@AAAAADA
Copy link
Author

AAAAADA commented Nov 14, 2022

torch版本1.10.0

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

1 participant