Well, you can think of dim as a numpy axis. Could you elaborate what you expected?
Numpy will behave in the same way for this problem:
x = np.random.randn(64, 10, 3, 32, 32)
y = np.linalg.norm(x, ord=2, axis=1)
print(y.shape)