Compute Squared distance b/w two tensors inside a model in PyTorch :

D = | P1− P2 | ^ 2

options:
    torch.norm(p1 - p2, dim=0)
    (p1 - p2).pow(2).sum(1)
    torch.dist(p1, p2, 2)

which one is correct for just the squared distance between two tensors?