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

Addition of ICNN Initialization Schemes #90

Merged
merged 22 commits into from
Jun 30, 2022
Merged

Addition of ICNN Initialization Schemes #90

merged 22 commits into from
Jun 30, 2022

Conversation

bunnech
Copy link
Collaborator

@bunnech bunnech commented Jun 30, 2022

In this pull request, we add input convex neural network (ICNN) initialization schemes proposed in Bunne+(2022). Given a source and target measure, one aims at learning a map T between source and target parameterized via the gradient of an ICNN. To facilitate training, Bunne+(2022) propose to initialize the ICNN via different initialization schemes:
(i.) The identity function, i.e., before training (and without a pretraining requirement), the gradient of the ICNN maps its input measure onto itself.
(ii.) The gaussian approximation initializes the ICNN in such a way that the gradient of the ICNN maps a measure onto the Gaussian approximation of the opposite measure (utilizing closed-form results for Gaussian optimal transport maps).

This pull request also updates the existing NeuralDual to operate on the new ICNN initialization and a notebook comparing both initialization schemes.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@bunnech bunnech requested a review from marcocuturi June 30, 2022 09:11
@bunnech bunnech added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 30, 2022
@bunnech bunnech requested a review from michalk8 June 30, 2022 10:06
Copy link
Contributor

@marcocuturi marcocuturi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Charlotte! a few comments to start

ott/core/icnn.py Outdated Show resolved Hide resolved
ott/core/icnn.py Outdated Show resolved Hide resolved
ott/core/icnn.py Outdated Show resolved Hide resolved
ott/core/icnn.py Outdated Show resolved Hide resolved
ott/core/icnn.py Outdated Show resolved Hide resolved
ott/core/layers.py Outdated Show resolved Hide resolved
ott/core/layers.py Outdated Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
@bunnech bunnech merged commit fb00c9e into ott-jax:main Jun 30, 2022
docs/notebooks/icnn_inits.ipynb Show resolved Hide resolved
@@ -0,0 +1,520 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary braces in (dataloader_source, ..., )

In general, would prefer code cells to be formatted (black is ok if @marcocuturi is ok with it; wasn't able to find yapf-based formatter for notebooks).


Reply via ReviewNB

@@ -0,0 +1,520 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please use scientific notation for floats?


Reply via ReviewNB

michalk8 pushed a commit that referenced this pull request Jun 27, 2024
* Add ICNN formulation with new initialization schemes.

* Adapt ICNN test.

* Add notebook comparing both ICNN initialization schemes.

* Update notebook on neural dual.

* Add notebook to documentation.

* Integration of comments by Marco.

* Integration of comments by Marco.

* Integration of comments by Marco.

* Integration of comments by Marco.

* 😵

* 🤯
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants