Commit 1257136f authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira

Merge branch 'multiprocessing' of gitlab.idiap.ch:bob/bob.learn.em into multiprocessing

parents b072592d 64cc7198
Pipeline #29914 passed with stage
in 24 minutes and 27 seconds
......@@ -137,7 +137,7 @@ def test_gmm_ML_parallel():
# Run ML
import multiprocessing.pool
pool = multiprocessing.pool.ThreadPool(3)
#pool = multiprocessing.Pool(3)
# pool = multiprocessing.Pool(1)
bob.learn.em.train(ml_gmmtrainer, gmm, ar, max_iterations = max_iter_gmm, convergence_threshold=accuracy, pool=pool)
# Test results
......@@ -146,7 +146,6 @@ def test_gmm_ML_parallel():
variancesML_ref = bob.io.base.load(datafile('variancesAfterML.hdf5', __name__, path="../data/"))
weightsML_ref = bob.io.base.load(datafile('weightsAfterML.hdf5', __name__, path="../data/"))
# Compare to current results
assert equals(gmm.means, meansML_ref, 3e-3)
assert equals(gmm.variances, variancesML_ref, 3e-3)
......
......@@ -96,6 +96,7 @@ def train(trainer, machine, data, max_iterations = 50, convergence_threshold=Non
# use only one core
trainer.e_step(machine, data)
else:
# use the given process pool
processes = pool._processes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment