xtr = np.random.randn(5, 10)
xtr[0] = [-2.4682, 0.9872, -0.4661, 1.7443, 0.5375, -0.5948, 2.2457, -0.2980, 1.2467, 0.2932]
X = Variable(torch.from_numpy(xtr))
mu = Variable(torch.randn(10, 5), requires_grad=True)
mu[:, 0] = torch.tensor([ 0.1971, 1.0803, -0.8145, 0.9733, -1.4811, -1.0713, 0.3086, 0.6137, -0.6779, 0.3576])

res1 = X[0,:]-mu[:,0]
res2 = X[0,:].data.numpy()-mu[:,0].data.numpy()
print((res1.detach().numpy()-res2))
> [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]