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

Understanding Linalg.vector_norm() In PyTorch

Explained: linalg.vector_norm() in PyTorch for vector norms (L0, L1, L2, etc.) with optional arguments like dim and dtype.

Buy Me a Coffee☕
*Memos:

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

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

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

It must be the 0D 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.vector...