You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces torch.linalg.norm with torch.linalg.vector_norm for vector-norm
`torch.linalg.norm` supports various calculations based on `dim` parameter:
- If dim is an int, the vector norm will be computed.
- If dim is a 2-tuple, the matrix norm will be computed.
- If dim=None and ord=None, A will be flattened to 1D and the 2-norm of the resulting vector will be computed.
- If dim=None and ord!=None, A must be 1D or 2D.
Therefore, vector norm is not computed when `dim` is tuple. (Nit: `torch.linalg.vector_norm` is more explicit for vector norms.)
0 commit comments