When I use pytorch to do the backward grad, get error:
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()