Commit 0cd9fbd9 authored by Davis King's avatar Davis King

Added some missing DLIB_ASSERT statements.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404196
parent 640acab2
......@@ -86,6 +86,14 @@ namespace dlib
const std::vector<label_type>& all_labels
) const
{
// make sure requires clause is not broken
DLIB_ASSERT(is_learning_problem(all_samples,all_labels),
"\t trained_function_type one_vs_all_trainer::train(all_samples,all_labels)"
<< "\n\t invalid inputs were given to this function"
<< "\n\t all_samples.size(): " << all_samples.size()
<< "\n\t all_labels.size(): " << all_labels.size()
);
const std::vector<label_type> distinct_labels = select_all_distinct_labels(all_labels);
std::vector<scalar_type> labels;
......
......@@ -88,6 +88,14 @@ namespace dlib
const std::vector<label_type>& all_labels
) const
{
// make sure requires clause is not broken
DLIB_ASSERT(is_learning_problem(all_samples,all_labels),
"\t trained_function_type one_vs_one_trainer::train(all_samples,all_labels)"
<< "\n\t invalid inputs were given to this function"
<< "\n\t all_samples.size(): " << all_samples.size()
<< "\n\t all_labels.size(): " << all_labels.size()
);
const std::vector<label_type> distinct_labels = select_all_distinct_labels(all_labels);
std::vector<sample_type> samples;
......
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