From b4ba2fce4bfd666a06a848b2704d6fff25d03904 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 11 Dec 2011 14:37:57 -0500 Subject: [PATCH] Fixed a bug which triggered when using variable length matrices as the feature vector type. --- dlib/svm/structural_svm_assignment_problem.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dlib/svm/structural_svm_assignment_problem.h b/dlib/svm/structural_svm_assignment_problem.h index 3fa6fb16c..7462a43a0 100644 --- a/dlib/svm/structural_svm_assignment_problem.h +++ b/dlib/svm/structural_svm_assignment_problem.h @@ -94,6 +94,7 @@ namespace dlib ) const { typename feature_extractor::feature_vector_type feats; + psi.set_size(fe.num_features()); psi = 0; for (unsigned long i = 0; i < sample.first.size(); ++i) {