Return type:
      Tensor
If x1 has shape B \times P \times M and x2 has shape B \times R
   \times M then the output will have shape B \times P \times R.
This function is equivalent to
   scipy.spatial.distance.cdist(input,'minkowski', p=p) if p \in (0,
   \infty). When p = 0 it is equivalent to
   scipy.spatial.distance.cdist(input, 'hamming') * M. When p =
   \infty, the closest scipy function is
   scipy.spatial.distance.cdist(xn, lambda x, y: np.abs(x -
   y).max()).
-[ Example ]-



a = torch.tensor([[0.9041,  0.0196], [-0.3108, -2.4423], [-0.4821,  1.059]])
a
   tensor([[ 0.9041,  0.0196],
           [-0.3108, -2.4423],
           [-0.4821,  1.0590]])
b = torch.tensor([[-2.1763, -0.4713], [-0.6986,  1.3702]])
b
   tensor([[-2.1763, -0.4713],
           [-0.6986,  1.3702]])
torch.cdist(a, b, p=2)
   tensor([[3.1193, 2.0959],
           [2.7138, 3.8322],
           [2.2830, 0.3791]])


