-
Notifications
You must be signed in to change notification settings - Fork 80
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
Feature/ Introduce initialization methods for Sinkhorn #98
Conversation
…oduce defaultinit class
@michalk8 : i had some issues with the webhook to enable recompiling docs on PR. I will look into this soon. |
@JTT94 could you please fix the bibtex file and deal with the rest of the comments? After that, think we can merge. |
Thanks for the feedback, this is good to be merged |
Also just noticed that the initializers are not registered as PyTrees, i.e.
fails. Could you please register them using |
Thanks a lot @JTT94 , could you please include the last change mentioned here: #98 (comment) ? It's more efficient than doing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JTT94, LGTM, merging this!
Great! And thanks for your patience with feedback, I appreciate it |
* add sorting, gaus initializers, add gaus helpers to tools * add initialization logic to sinkhorn * remove general ot problem type * remove import tools.gaussian from top level * remove problems from top level * do not register initializer as pytree * add initializer to make * rename init arg to ot_problem * rename init arg to ot_problem * scale gaus init by 2 * typo * add basic speed tests * add init to transport tools wrapper, tidy docstring * ceneter potentials in initializers * fix lse for null weights * fix flake8 and accidental removal * tidy docstrings * tidy docstrings * docstring flake8 * flake 8 formatting * fix typo * fix stop gradient in Gaussian to include weights and x,y * fix stop gradient in Gaussian to include weights and x,y * fix docstring spaces * feedback from initial review * re order local functions before state init * optional init_f in sorting init * docstring insert line before return * lint fix * incorporate feedback in commit * tidy tests, use jax.lax.cond for logic instead of if * add docs, rename sorting initializer * fix merge conflict * resolve test errors in sinkhorn test * incorporate feedback, update tests to pytest, change docstrings, introduce defaultinit class * fix docstring spaces * remove spaces and add bibtex * add errors for non square cost matrix for sorting, online geoms for initializers, tests * merge fix lint * merge fix lint * add initializers as pytees * add init scaling tests * add init scaling tests * simplify vector update flag in sorting initializer * Fix documentation rendering * [ci skip] Fix typo in docs, use fixture in tests
Examples here: https://colab.research.google.com/drive/1vncmDEr3t6_OKfVC0PJin8PIRBViPyO0?usp=sharing
Initialization methods stored in /core/initializers.py
SinkhornInitializer
init_dual_a
andinit_dual_b
lse_mode
, also handling entries for 0 weightsModification to Sinkhorn api,
init_dual_a
/init_dual_b
vectors are passed to solver