feat(compatibility): Python3.7 compatibility

This commit is contained in:
Alexander Engelsberger
2021-08-30 17:00:46 +02:00
committed by Alexander Engelsberger
parent 7f0a8e9bce
commit 083b5c1597
3 changed files with 2 additions and 4 deletions

View File

@@ -41,9 +41,6 @@ def euclidean_distance_v2(x, y):
# batch diagonal. See:
# https://pytorch.org/docs/stable/generated/torch.diagonal.html
distances = torch.diagonal(pairwise_distances, dim1=-2, dim2=-1)
# print(f"{diff.shape=}") # (nx, ny, ndim)
# print(f"{pairwise_distances.shape=}") # (nx, ny, ny)
# print(f"{distances.shape=}") # (nx, ny)
return distances