Hello @Peter1998: firstly thank you for the explanation. It certainly helped. I guess what I really am trying to find out is what this line does:
 dist=torch.abs(b-a)
Would you say this is the l2 norm since it is the absolute value? I am not sure how this translates to a distance measure