From a67c7c73c974f2fc10183004ae58f0a62830e0e3 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 19 Oct 2013 09:20:36 -0400 Subject: [PATCH] Slightly tweaked PSI validation test again --- dlib/svm/structural_svm_object_detection_problem.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlib/svm/structural_svm_object_detection_problem.h b/dlib/svm/structural_svm_object_detection_problem.h index a95e5fa53..6b287170e 100644 --- a/dlib/svm/structural_svm_object_detection_problem.h +++ b/dlib/svm/structural_svm_object_detection_problem.h @@ -411,12 +411,12 @@ namespace dlib #ifdef ENABLE_ASSERTS const double psi_score = dot(psi, current_solution); - DLIB_ASSERT(std::abs(psi_score-total_score)*std::max(psi_score,total_score) < 1e-5, + DLIB_ASSERT(std::abs(psi_score-total_score) <= 1e-5 * std::max(std::abs(psi_score),std::abs(total_score)), "\t The get_feature_vector() and detect() methods of image_scanner_type are not in sync." << "\n\t The relative error is too large to be attributed to rounding error." - << "\n\t relative error: " << std::abs(psi_score-total_score)*std::max(psi_score,total_score) - << "\n\t psi_score: " << psi_score - << "\n\t total_score: " << total_score + << "\n\t error: " << std::abs(psi_score-total_score) + << "\n\t psi_score: " << psi_score + << "\n\t total_score: " << total_score ); #endif