Skip to content

Commit 39e1930

Browse files
authored
Remove duplicate reshape of x1. (#137)
1 parent 29c0ed6 commit 39e1930

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

torchcfm/optimal_transport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def get_map(self, x0, x1):
8181
x0 = x0.reshape(x0.shape[0], -1)
8282
if x1.dim() > 2:
8383
x1 = x1.reshape(x1.shape[0], -1)
84-
x1 = x1.reshape(x1.shape[0], -1)
8584
M = torch.cdist(x0, x1) ** 2
8685
if self.normalize_cost:
8786
M = M / M.max() # should not be normalized when using minibatches

0 commit comments

Comments
 (0)