当我使用pytorch进行向后毕业时,出现错误:
RuntimeError: Tensor: invalid storage offset at c:\users\administrator\downloads\new-builder\win-wheel\pytorch\aten\src\th\generic/THTensor.cpp:761
H_grad = torch.autograd.grad(outputs=prediction.sum(), inputs=database_choose, create_graph=True)[0]
Ht=H_grad[:,1].reshape(choose,1)
Htt=torch.autograd.grad(outputs=Ht.sum(), inputs=database_choose,create_graph=True)[0][:,1].reshape(choose,1)
loss.backward()