ucascnic / CudaOT

Repository for solving discrete optimal transport problems via Cplex, Sinkhorn, FastEMD and the GPU implementation of SparseSinkhorn,
53 stars 2 forks source link

Call M3S with Python #4

Closed bearinsuke closed 5 months ago

bearinsuke commented 5 months ago

Hi,

Is there any example for M3S algorithm on Python? If not, how can I call those functions from your cpp files?

ucascnic commented 5 months ago

Happy new year! A simple python example could be found in:

https://github.com/ucascnic/CudaOT/blob/main/pythonExample/sparseOT/sparse_transport.py

The function log_sinkhorn_sparse implements a stable and simple M3S algo.

bearinsuke commented 5 months ago

Thanks for your reply. Happy new year!