Batch-wise norm of a tensor
I have a tensor t of dim n x 3. When I apply torch.linalg.norm it returns one single value. What I need is a batch-wise norm function which will return a tensor with n norms, one for each vector in t.
Thanks for your help.

It seems the most relevant documentation place is:
https://pytorch.org/docs/stable/generated/torch.linalg.norm.html
In the terminal you could try: python3 and then the following python commands:
&gt;&gt;&gt; from torch import linalg as LA
&gt;&gt;&gt; c = torch.tensor([[1., 2., 3.],
...                   [-1, 1, 4]])
&gt;&gt;&gt; LA.norm(c, dim=0)
tensor([1.4142, 2.2361, 5.0000])
&gt;&gt;&gt; LA.norm(c, dim=1)
tensor([3.7417, 4.2426])

Conclusion:
In your specific case you will need to do:
torch.linalg.norm(t,dim=1)

