Is .data still useful in pytorch 1.3 stable and what is the meaning of it?
Is .data still be used in the pytorch 1.3 stable, if so, could you please share the reference to me? Thx.

t = torch.randperm(8)
t.data


From PyTorch v0.4.0, calling y = x.data still has similar semantics. So y will be a Tensor that shares the same data with x, is unrelated to the computation history of x, and has requires_grad=False.

However, .data can be unsafe in some cases. Any changes on x.data wouldn't be tracked by autograd, and the computed gradients would be incorrect if x is needed in a backward pass. A safer alternative is to use x.detach(), which also returns a Tensor that shares data with requires_grad=False, but will have its in-place changes reported by autograd if x is needed in backward.

Reference: https://github.com/pytorch/pytorch/releases/tag/v0.4.0
