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

Importing retinaface causes all torch tensors to lack gradient function #14

Open
yhu9 opened this issue Aug 15, 2023 · 1 comment
Open

Comments

@yhu9
Copy link

yhu9 commented Aug 15, 2023

Expected behavior of torch Tensors is to have a gradient function if it requires gradient.

Shortest example I have on what is happening for me.

import torch
x = torch.randn(1, requires_grad=True)
print(x + 1)
tensor([1.3468], grad_fn=<AddBackward0>)
import torch
import retinaface
x = torch.randn(1, requires_grad=True)
print(x + 1)
tensor([1.3468])
@aixiaodewugege
Copy link

This problem waste a lot of my time.....It took me half a day to fix it.

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