Hi,
The .data field is kept for backward compatibility but should not be used at all.
Why do you need it? You should replace all use of it with either .detach() to break the graph or with torch.no_grad() to perform ops that are not tracked by the autograd engine.