Currently, PyTorch's pdist()
doesn't have a built-in function to compute only specific rows of the distance matrix.
This is PyTorch GitHub repository: https://github.com/pytorch/pytorch/issues this would be a better place to discuss and find a solution