Skip to content

Commit 29b013a

Browse files
committed
bug solve
1 parent 2778175 commit 29b013a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ot/backend.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,10 +1444,14 @@ def allclose(self, a, b, rtol=1e-05, atol=1e-08, equal_nan=False):
14441444

14451445
class _TorchBackendGPU(TorchBackend):
14461446
r"""
1447-
This class allows to test the torch backend on GPUs. By wrapping the standard from_numpy method, this backend places the tensor on a GPU by default, which allow to make the test without significant changes in the code of the test itself.
1447+
This class allows to test the torch backend on GPUs. By wrapping the standard from_numpy method,
1448+
this backend places the tensor on a GPU by default, which allow to make the test without
1449+
significant changes in the code of the test itself.
14481450
"""
14491451

1450-
__name__ = TorchBackend().__name__ + ".gpu"
1452+
@property
1453+
def __name__(self):
1454+
return super().__name__ + ".gpu"
14511455

14521456
def __str__(self):
14531457
return super().__name__

0 commit comments

Comments
 (0)