Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated check_shapes() to return updated variables l_x, α, l_y, β #22

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions geomloss/samples_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def forward(self, *args):
Until then, please check the tutorials :-)"""

l_x, α, x, l_y, β, y = self.process_args(*args)
B, N, M, D = self.check_shapes(l_x, α, x, l_y, β, y)
B, N, M, D, l_x, α, l_y, β = self.check_shapes(l_x, α, x, l_y, β, y)

backend = self.backend # Choose the backend -----------------------------------------
if l_x is not None or l_y is not None:
Expand Down Expand Up @@ -340,4 +340,4 @@ def check_shapes(self, l_x, α, x, l_y, β, y):
if N != N2: raise ValueError("Weights 'α' and samples 'x' should have compatible shapes.")
if M != M2: raise ValueError("Weights 'β' and samples 'y' should have compatible shapes.")

return B, N, M, D
return B, N, M, D, l_x, α, l_y, β