diff options
author | ncassereau-idris <84033440+ncassereau-idris@users.noreply.github.com> | 2021-10-25 11:36:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 11:36:21 +0200 |
commit | 7a65086dd340265d0223eb8ffb5c9a5152a82dff (patch) | |
tree | 300f4a1cd645516fba1e440691fe48830d781b5c /test/test_stochastic.py | |
parent | 7af8c2147d61349f4d99ca33318a8a125e4569aa (diff) |
[MRG] Bregman backend (#280)
* Bregman
* Resolve conflicts
* Bug solve
* Bregman updated for JAX compatibility
* Tests coherence between backend improved
* No longer enforcing 64 bits operations on Jax except for tests
* Now using mixtures, to make backend dependent tests with less code
* Better test skipping code
* Pep8 + test optimizations
* redundancy removed
* Docs
* Typo corrected
* Typo
* Typo
* Docs
* Docs
* pep8
* Backend docs
* Prettier docs
* Mistake corrected
* small changes
* Better wording
Co-authored-by: RĂ©mi Flamary <remi.flamary@gmail.com>
Diffstat (limited to 'test/test_stochastic.py')
-rw-r--r-- | test/test_stochastic.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_stochastic.py b/test/test_stochastic.py index 98e93ec..736df32 100644 --- a/test/test_stochastic.py +++ b/test/test_stochastic.py @@ -43,7 +43,7 @@ def test_stochastic_sag(): G = ot.stochastic.solve_semi_dual_entropic(u, u, M, reg, "sag", numItermax=numItermax) - # check constratints + # check constraints np.testing.assert_allclose( u, G.sum(1), atol=1e-03) # cf convergence sag np.testing.assert_allclose( @@ -73,7 +73,7 @@ def test_stochastic_asgd(): G, log = ot.stochastic.solve_semi_dual_entropic(u, u, M, reg, "asgd", numItermax=numItermax, log=True) - # check constratints + # check constraints np.testing.assert_allclose( u, G.sum(1), atol=1e-02) # cf convergence asgd np.testing.assert_allclose( @@ -105,7 +105,7 @@ def test_sag_asgd_sinkhorn(): numItermax=nb_iter) G_sinkhorn = ot.sinkhorn(u, u, M, reg) - # check constratints + # check constraints np.testing.assert_allclose( G_sag.sum(1), G_sinkhorn.sum(1), atol=1e-02) np.testing.assert_allclose( @@ -148,7 +148,7 @@ def test_stochastic_dual_sgd(): G, log = ot.stochastic.solve_dual_entropic(u, u, M, reg, batch_size, numItermax=numItermax, log=True) - # check constratints + # check constraints np.testing.assert_allclose( u, G.sum(1), atol=1e-03) # cf convergence sgd np.testing.assert_allclose( @@ -181,7 +181,7 @@ def test_dual_sgd_sinkhorn(): G_sinkhorn = ot.sinkhorn(u, u, M, reg) - # check constratints + # check constraints np.testing.assert_allclose( G_sgd.sum(1), G_sinkhorn.sum(1), atol=1e-02) np.testing.assert_allclose( @@ -206,7 +206,7 @@ def test_dual_sgd_sinkhorn(): G_sinkhorn = ot.sinkhorn(a, b, M, reg) - # check constratints + # check constraints np.testing.assert_allclose( G_sgd.sum(1), G_sinkhorn.sum(1), atol=1e-03) np.testing.assert_allclose( |