Implementation of Learning Gradients of Convex Functions with Monotone Gradient Networks (Chaudhari et al. (2023)) [1]
The main code is in the experiments.ipynb notebook. You will be able to reproduce the following experiments:
- Implementation of models:
models.pyand section 1 notebook - Gradient field experiment from [1] : section 2 notebook
- Optimal coupling: section 3 notebook, 3.a Wasserstein loss, 3.b KL-divergence loss, 3.c CP-Flow experiment (see setup)
- Color domain adaptation: section 4 notebook
- Clone CP-Flow to be able to run the corresponding experiment in the notebook
- Move
models.py,train_ot_coupling.pyinto the main folder ofCP-Flow - Move into CP-Flow folder and run
pip install -r requirements.txt - Run
python3 train_ot_coupling.py
If you want to run on more images, you can follow these steps:
- Download the Dark Zurich dataset validation set.
- Get the folder
/Dark_Zurich_val_anon/rgb_anon/val_ref/day/GOPR0356_refand add new pictures to the dark_zurich folder !