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])
>>> X[0,:]-mu[:,0]
tensor([ -2.6653e+00,   2.0585e+00,  -4.6610e-01, -1.2407e+214,   5.3750e-01,
         -5.9480e-01,   2.2457e+00, -1.7297e+156,  -1.7331e+97,   2.9320e-01],
       dtype=torch.float64, grad_fn=<SubBackward0>)

>>> X[0,:].data.numpy()-mu[:,0].data.numpy()
array([-2.6653    , -0.09309997,  0.34839997,  0.77100002,  2.01859996,
        0.47650003,  1.93709999, -0.91169997,  1.92460002, -0.0644    ])

I followed the same steps and am still facing this issue.