I can obtain loss value like this
print(last_loss_v)
# tensor([3.0082], device='cuda:0')

But I can’t see grad value from
print(last_loss_v.grad) # None

And when I try this
last_loss_v.backward()

This erros shows up
RuntimeError: 
element 0 of tensors does not require grad and does not have a grad_fn

What I want is to update CNN weights until this loss tensor([3.0082], device=‘cuda:0’) minimizes enough
Would you inform me some guides about points what I incorrectly did and how to solve above errors?