ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more


Compute the pairwise distances matrix.

Given input embedding vectors, this utility computes the (squared) pairwise distances matrix.

input_vecs a Tensor. Input embedding vectors (one per row).

The (squared) pairwise distances matrix. A dense float Tensor of shape [num_vectors, num_vectors], where num_vectors is the number of input embedding vectors.