From cee55534b829e0bd85a1d790c8be5c7b5093c18a Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Mon, 26 May 2014 11:30:02 +0200 Subject: [PATCH] Reduce number of iterations to make test pass --- xbob/learn/misc/test_em.py | 1 - xbob/learn/misc/test_plda.py | 1 - xbob/learn/misc/test_plda_trainer.py | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/xbob/learn/misc/test_em.py b/xbob/learn/misc/test_em.py index 34e15f2..bfc8a16 100644 --- a/xbob/learn/misc/test_em.py +++ b/xbob/learn/misc/test_em.py @@ -145,7 +145,6 @@ def test_gmm_MAP_2(): gmm_adapted.weights = weights map_adapt.max_iterations = 1 - print(data.shape) map_adapt.train(gmm_adapted, data) new_means = xbob.io.base.load(datafile('new_adapted_mean.hdf5', __name__)) diff --git a/xbob/learn/misc/test_plda.py b/xbob/learn/misc/test_plda.py index 210cdab..a97c7dc 100644 --- a/xbob/learn/misc/test_plda.py +++ b/xbob/learn/misc/test_plda.py @@ -247,7 +247,6 @@ def test_plda_basemachine(): for jj in range(m.__alpha__.shape[1]): absdiff = abs(m.__alpha__[ii,jj]- alpha_ref[ii,jj]) assert absdiff < 1e-10, 'PLDABase alpha matrix does not match reference at (%d,%d) to 10^-10: |%g-%g| = %g' % (ii, jj, m.__alpha__[ii,jj], alpha_ref[ii,jj], absdiff) - print(m.__alpha__ - alpha_ref) assert equals(m.__alpha__, alpha_ref, 1e-10) assert equals(m.__beta__, beta_ref, 1e-10) assert equals(gamma3, gamma3_ref, 1e-10) diff --git a/xbob/learn/misc/test_plda_trainer.py b/xbob/learn/misc/test_plda_trainer.py index 6ea1c36..5cfa49d 100644 --- a/xbob/learn/misc/test_plda_trainer.py +++ b/xbob/learn/misc/test_plda_trainer.py @@ -362,8 +362,8 @@ def test_plda_EM_vs_Python(): # Runs the PLDA trainer EM-steps (2 steps) # Defines base trainer and machine - t = PLDATrainer(10) - t_py = PythonPLDATrainer() + t = PLDATrainer(1) + t_py = PythonPLDATrainer(max_iterations=1) m = PLDABase(D,nf,ng) m_py = PLDABase(D,nf,ng) -- GitLab