Hi, for pytorch < 0.4, we can easily do:
a = Variable(b.data, requires_grad=True)

However, since .data is not recommeneded in 0.4, we can








a = b.detach()
a.requires_grad_()









a = b.detach().clone()
a.requires_grad_()









a = b.clone().detach()
a.requires_grad_()

I wonder what’s the difference among 1, 2, 3.