mirror of https://github.com/davisking/dlib.git
Added some missing DLIB_ASSERT statements.
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404196
This commit is contained in:
parent
640acab208
commit
0cd9fbd92a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue