shlogg · Early preview
Super Kai (Kazuya Ito) @superkai_kazuya

Understanding Matrix Norms With PyTorch's Linalg.matrix_norm()

Exploring linalg.matrix_norm() in PyTorch: compute matrix norms with various options and examples.

Buy Me a Coffee☕
*Memos:

My post explains linalg.norm().
My post explains linalg.vector_norm().

linalg.matrix_norm() can get the 0D or more D tensor of the one or more elements computed with matrix norm from the 2D or more D tensor of zero or more elements as shown below:
*Memos:

linalg.matrix_norm() can be used with torch but not with a tensor.
The 1st argument with torch is input(Required-Type:tensor of float or complex):
*Memos:

It must be the 2D or more D tensor of zero or more elements.
A complex tensor returns a float tensor even if dtype=torch.complex64 is set to linalg.norm() whic...