This is an improved version of the repository SSNS, which is used to run the numerical experiments in the paper SSNS and SPLR.
Create a new environment num, and install dependencies.
conda create -n num python=3.13
conda activate num
pip install scikit-learn scipy tqdm numpy seaborn ipykernel
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpuDirectly install using pip:
pip install regotOr to install the latest version of regot-python:
conda activate num
conda install gxx_linux-64
git clone --depth=1 https://github.com/yixuan/regot-python.git
cd regot-python
pip install . -r requirements.txtRunning main.ipynb saves the results and plots in save folder.
The experiments include:
- (Fashion-)MNIST: Optimal transport between two images.
- Imagenette: Optimal transport between two classes of images.
- Synthetic Data: Optimal transport between two given distributions and cost matrices.