Open yhu9 opened 1 year ago
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])
This problem waste a lot of my time.....It took me half a day to fix it.
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.