now i am getting following error.
------------------------------ tensor([[3841.0667, 3840.0134, 3841.4934, 3840.0000]], device=‘cuda:0’)
------------------------------ tensor([[ 172.9745, -751.5243,  279.0851]],
device=‘cuda:0’, grad_fn=) tensor([-4.4937e-03,  2.6100e-03,  3.4345e+02],
device=‘cuda:0’, grad_fn=)
File “/usr/local/lib/python3.5/dist-packages/torch/autograd/init.py”, line 90, in backward
allow_unreachable=True)  # allow_unreachable flag
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
I am new in that. and Thank for your help. what i need to change in code