dgs.models.metric.metric.CosineSimilarityMetric.forward

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

Due to the sheer size of the PoseTrack21 dataset, CosineSimilarity() does not work due to memory issues. See this issue <https://github.com/pytorch/pytorch/issues/104564#issuecomment-1625348908>_ for more details.

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.

References

https://github.com/pytorch/pytorch/issues/104564#issuecomment-1625348908