dgs.models.metric.metric.EuclideanSquareMetric.forward

static EuclideanSquareMetric.forward(input1: torch.Tensor, input2: torch.Tensor) torch.Tensor[source]

Compute squared Euclidean distance between two matrices with a matching second dimension.

Parameters:
  • input1 – tensor of shape [a x E]

  • input2 – tensor of shape [b x E]

Returns:

tensor of shape [a x b] containing the distances.