Hi,
You should never use .data as a general rule 
In this case, it break the computational graph and prevent gradients from being computed.
Also the autograd won’t work if your perform your ops on numpy Tensors I’m afraid. You will either have to convert your code to use pytorch functions (which should be the simplest) or write a custom backward.