I want to implement L2 norm in pytorch, and compare the result with np.linalg.norm. they have different result, how can I fix it?
num = np.linalg.norm(
                    (extracted_feat[str(key)].cpu().detach().numpy() - extracted_feats_aug[str(key)].cpu().detach().numpy()) / np.mean(extracted_feat[str(key)].cpu().detach().numpy()))```
 num = 13982.017 (float32)

`torch.sqrt(torch.sum(((extracted_feat[str(key)] - extracted_feats_aug[str(key)]) / torch.mean(extracted_feat[str(key)]))**2))`
valu: tensor(13989.3135, device='cuda:0')


(((extracted_feat[str(key)] - extracted_feats_aug[str(key)]) / torch.mean((extracted_feat[str(key)])).norm(p=2)
value:  tensor(13989.3135, device='cuda:0')