From my (personal) point of view, I would advise against playing with the .data of the Variable by hand (your hack may break in the future), especially in this case where you have an autograd function that does what you want.