I found the code for “Stochastic Optimization for Large-scale Optimal Transport”
https://github.com/audeg/StochasticOT 98
It doesn’t look too confusing , I think I’m starting to understand what’s going on!