dgs.models.metric.metric.EuclideanDistanceMetric¶
- class dgs.models.metric.metric.EuclideanDistanceMetric(*args: Any, **kwargs: Any)[source]¶
Class to compute the Euclidean distance between two matrices.
Methods
- __init__(*args: Any, **kwargs: Any) None ¶
- static forward(input1: torch.Tensor, input2: torch.Tensor) torch.Tensor [source]¶
Compute 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.