-
Notifications
You must be signed in to change notification settings - Fork 62
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
sinkhorn_divergence for 1D images not workin #63
Comments
The code assumes the input has batch and channel dimensions and at least 2 spatial dimensions. |
Hi @albeltra And how can it be used for 1D inputs. I want to compare histograms. Using a BxNx1x1 tensor as input? |
If you want something that just runs you could replicate this histogram an additional two dimensions. Then maybe set return potentials to True and index them to ignore the additional dimensions. But if you look at the code its pretty easy to copy the if else blocks to add an additional case for 1D data. You could pull the repo and do pip install -e to run the modified code Or you could use the closed form Wasserstein distance in 1D which is basically just a cumsum of differences operation. But not sure what ur eventual goal is. |
Hi @albeltra, @rsanchezgarc, Thanks for your interest in this library! Best regards, |
Hi, I think that sinkhorn_divergence is not working for 1D images despite what the documentation says.
It would be great if you can fix it
Thanks
Ruben
The text was updated successfully, but these errors were encountered: