Skip to content

Commit 6dd9877

Browse files
committed
Convert to double befoe computing torch norm
1 parent dcb19c6 commit 6dd9877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ot/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,7 @@ def power(self, a, exponents):
18821882
return torch.pow(a, exponents)
18831883

18841884
def norm(self, a, axis=None):
1885-
return torch.linalg.norm(a, dim=axis)
1885+
return torch.linalg.norm(a.double(), dim=axis)
18861886

18871887
def any(self, a):
18881888
return torch.any(a)

0 commit comments

Comments
 (0)