Skip to content

Commit

Permalink
Remove duplicate reshape of x1. (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScheiklP authored Oct 9, 2024
1 parent 29c0ed6 commit 39e1930
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion torchcfm/optimal_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def get_map(self, x0, x1):
x0 = x0.reshape(x0.shape[0], -1)
if x1.dim() > 2:
x1 = x1.reshape(x1.shape[0], -1)
x1 = x1.reshape(x1.shape[0], -1)
M = torch.cdist(x0, x1) ** 2
if self.normalize_cost:
M = M / M.max() # should not be normalized when using minibatches
Expand Down

0 comments on commit 39e1930

Please sign in to comment.