From d2625a0deaad7135923f79dc96ae85ed529f9a53 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 26 Jan 2013 20:20:52 -0500 Subject: [PATCH] made test more robust --- dlib/test/sequence_labeler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlib/test/sequence_labeler.cpp b/dlib/test/sequence_labeler.cpp index 0ef1f8eb8..4002d6821 100644 --- a/dlib/test/sequence_labeler.cpp +++ b/dlib/test/sequence_labeler.cpp @@ -416,8 +416,8 @@ namespace trainer_part.set_c(4); trainer.set_num_threads(4); trainer_part.set_num_threads(4); - trainer.set_epsilon(1e-4); - trainer_part.set_epsilon(1e-4); + trainer.set_epsilon(1e-8); + trainer_part.set_epsilon(1e-8); @@ -429,7 +429,7 @@ namespace dlog << LINFO << "max weight magnitude: "<< max(abs(labeler.get_weights())); // Both feature extractors should be equivalent. - DLIB_TEST(length(labeler.get_weights() - labeler_part.get_weights()) < 1e-10); + DLIB_TEST(max(abs(labeler.get_weights() - labeler_part.get_weights())) < 1e-6); }