From 2c45ab5e91585b93c37b992eea6a117a9df01337 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 6 May 2012 10:09:59 -0400 Subject: [PATCH] Slightly improved messages from some asserts. --- dlib/svm/structural_graph_labeling_trainer.h | 1 + dlib/svm/structural_svm_graph_labeling_problem.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlib/svm/structural_graph_labeling_trainer.h b/dlib/svm/structural_graph_labeling_trainer.h index 8f6cbc934..65b5708f3 100644 --- a/dlib/svm/structural_graph_labeling_trainer.h +++ b/dlib/svm/structural_graph_labeling_trainer.h @@ -135,6 +135,7 @@ namespace dlib // make sure requires clause is not broken DLIB_ASSERT(is_graph_labeling_problem(samples, labels), "\t void structural_graph_labeling_trainer::train()" + << "\n\t Invalid inputs were given to this function." << "\n\t samples.size(): " << samples.size() << "\n\t labels.size(): " << labels.size() << "\n\t this: " << this diff --git a/dlib/svm/structural_svm_graph_labeling_problem.h b/dlib/svm/structural_svm_graph_labeling_problem.h index 0361ebbf8..36c290a09 100644 --- a/dlib/svm/structural_svm_graph_labeling_problem.h +++ b/dlib/svm/structural_svm_graph_labeling_problem.h @@ -144,7 +144,10 @@ namespace dlib // make sure requires clause is not broken DLIB_ASSERT(is_graph_labeling_problem(samples, labels) == true, "\t structural_svm_graph_labeling_problem::structural_svm_graph_labeling_problem()" - << "\n\t invalid inputs were given to this function"); + << "\n\t Invalid inputs were given to this function." + << "\n\t samples.size(): " << samples.size() + << "\n\t labels.size(): " << labels.size() + << "\n\t this: " << this ); // figure out how many dimensions are in the node and edge vectors.