Dear dambo,
I had the same concerns as you, and designed a cpp function, linalg_norm [1] using the LibTorch that performs the functions of the numpy.linalg.norm.
Actually, the LibTorch also provides Function torch::linalg::norm() [2], but I cannot use it because I don’t know the required data types for the function.
I hope this reply is helpful to you.
Best regards,
Vujadeyoon