@ptrblck
Sorry to reopen this issue, I found that np.linalg.norm() and torch.norm give similar (I say similar is because the results have different decimal points) results for Frobenius norm, but for 2-norm, the results are more different:
Here is the code for reproduce:

import torch
from scipy.linalg import norm
import numpy as np
a = np.arange(9) - 4.0
a = a.reshape((3, 3))
test1 = np.linalg.norm(a)
7.745966692414834
test2 = torch.norm(torch.from_numpy(a).cuda())
tensor(7.7460, device=‘cuda:0’, dtype=torch.float64)
test1 = np.linalg.norm(a, ord=2)
7.3484692283495345
test2 = torch.norm(torch.from_numpy(a).cuda(), p=2)
tensor(7.7460, device=‘cuda:0’, dtype=torch.float64)

Do you think this is normal? I’m using Pytorch 1.2.0 on Ubuntu 18.04. I need to obtain exactly the same results for 2-norm.
Hao