nntoolbox.utils.norm_dist module¶
Utility functions involving computing norms and distances
-
nntoolbox.utils.norm_dist.
compute_squared_norm
(A: torch.Tensor) → torch.Tensor[source]¶ Compute the squared norm of each row of A
- Parameters
A – (M, D)
- Returns
squared norm (M, 1)