Hi, AFAIK, Variable is deprecated and now Tensorhas gradient. Check https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html#sphx-glr-beginner-blitz-autograd-tutorial-py 529 etc. or other official documents.