Why do we need tensor.data

Should .data attribute be deprecated in the future? Since we have torch.no_grad and other things that allow us to control availability of gradients we don’t need this attribute? @apaszke, @smth


It is already deprecated.
It does not appear in the doc anywhere anymore (if we missed some spots, please let me know).

We can’t really remove the attribute itself for BC reasons unfortunately.

Thank you for your answer