-
Notifications
You must be signed in to change notification settings - Fork 506
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
gromov_barycenters function always returns the zero matrix #530
Comments
Hello @youssef62 , The problem comes from the fact that 'c1 = nx.adjacency_matrix(g1).toarray()' as by default 'int64' as type. So the gromov wasserstein solver called several times in 'gromov_barycenters' will always convert the outputted transport plan to 'int64' i.e a 0 matrix. On our side, we could fix this bug by requesting to provide float inputs at least, no matter the backend. |
I think it makes sens to use the type given in the inpu for the plan (this is a nightmare to handle with backend otherwise. because what float type do you use (float32, float34?) better to let te user choose with teh input) But we definitely need to stet this clearly in the documentation and maybe to use a warning when the type is integer I thought we did that for emd but we shoudl check and do that also form gromov. |
Got it, thanks Rémi. Indeed for |
Describe the bug
gromov_barycenters
function always returns the zero matrix as cost matrix.I executed the code below multiple times and it always returns 0.
Screenshots
Code sample
Expected behavior
A non zero matrix.
Environment (please complete the following information):
pip
,conda
): pipOutput of the following code snippet:
The text was updated successfully, but these errors were encountered: