"examples/dnn_introduction_ex.cpp" did not exist on "02b844ea5c060594e5c8e4827311e9317c2ef9e1"
Commit 45731b86 authored by Davis King's avatar Davis King
Browse files

Always check that the data give to cross_validate_trainer() is valid.

It's a cheap check, and easy for someone to forget about otherwise.
parent eae3caf9
...@@ -417,7 +417,7 @@ namespace dlib ...@@ -417,7 +417,7 @@ namespace dlib
typedef matrix<scalar_type,0,1,mem_manager_type> scalar_vector_type; typedef matrix<scalar_type,0,1,mem_manager_type> scalar_vector_type;
// make sure requires clause is not broken // make sure requires clause is not broken
DLIB_ASSERT(is_binary_classification_problem(x,y) == true && DLIB_CASSERT(is_binary_classification_problem(x,y) == true &&
1 < folds && folds <= std::min(sum(y>0),sum(y<0)), 1 < folds && folds <= std::min(sum(y>0),sum(y<0)),
"\tmatrix cross_validate_trainer()" "\tmatrix cross_validate_trainer()"
<< "\n\t invalid inputs were given to this function" << "\n\t invalid inputs were given to this function"
......
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