Fix bug in SVM::trainAuto

pull/3909/head^2^2
Сергей Нужный 10 years ago
parent 581923fa57
commit 225da0226e
  1. 2
      modules/ml/src/svm.cpp

@ -1787,7 +1787,7 @@ public:
if( !do_train( temp_train_samples, temp_train_responses )) if( !do_train( temp_train_samples, temp_train_responses ))
continue; continue;
for( i = 0; i < test_sample_count; i++ ) for (i = 0; i < train_sample_count; i++)
{ {
j = sidx[(i+start+train_sample_count) % sample_count]; j = sidx[(i+start+train_sample_count) % sample_count];
memcpy(temp_train_samples.ptr(i), samples.ptr(j), sample_size); memcpy(temp_train_samples.ptr(i), samples.ptr(j), sample_size);

Loading…
Cancel
Save