tf_agents.bandits.agents.utils.compute_pairwise_distances

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.