To be honest, I’m not too sure how to use the POT library yet - but if you want to play around in Mocha, here’s the test of the Wasserstein layer,

  
      github.com
  
  
    pluskid/Mocha.jl/blob/master/examples/test-wasserstein.jl 52
data_type = Float32

using Mocha
srand(123)

N = 1000
d = 4
lambda = 0.1
sinkhorn_iter = 10

n_hidden_layer = 2
n_hidden_unit = 64

test_wasserstein = true

X = rand(data_type, d, N)
Y_onehot = zeros(data_type, 1, N)
Y = zeros(data_type, d, N)
for i = 1:N
  Y[indmax(X[:,i]),i] = 1


  This file has been truncated. show original

  
  
    
    
  
  


and just for the sake of completness, here’s the code to go with the original paper “Sinkhorn Scaling for Optimal Transport”
http://marcocuturi.net/SI.html 20
That’s probably the best place to start! Hopefully I’ll be able to make some sense of it all soon?