Here is from torch.norm() document:

If the input tensor has more than two dimensions, the vector norm will be applied to last dimension.

The following is from numpy.linalg.norm() document:

Input array. If  axis  is None,  x  must be 1-D or 2-D.

The behavior of numpy.linalg.norm is not defined when your input array has more than 2D. I don’t know how it is computed, but it is not the proper usage of numpy.linalg.norm. In this case, I think this function should have raised some errors or whatever.