Does autodiff engine track tensor.data?

I noticed that variable and tensor has been merged together after 0.4. But I still encounter some code accessing data field directly. So I just want to clarify a few things.

It seems like tensor.data is still a tensor object. Does autodiff engine track computation when operating on tensor.data directly (e.g. c = a.data + b.data)? If not, is tensor.data just another view of tensor but with requires_grad=False?

Hi,

Yes you should stop using it altogether :slight_smile:
You can find in this other thread a detailed explanation of the effects of .data: Using tensor.data

Does that answer your question?