I think for pytorch0.4 the tensor and tensor.data is the same thing now.
In [6]: type(x)
Out[6]: torch.Tensor

In [7]: type(x.data)
Out[7]: torch.Tensor

In [8]: x.__class__
Out[8]: torch.Tensor

In [9]: x.data.__class__
Out[9]: torch.Tensor