diff --git a/dlib/svm/structural_svm_problem.h b/dlib/svm/structural_svm_problem.h index 2a26f5f24..0b9a95782 100644 --- a/dlib/svm/structural_svm_problem.h +++ b/dlib/svm/structural_svm_problem.h @@ -550,7 +550,7 @@ namespace dlib ) const { obj = 0; - grad.set_size(m.size()); + grad.set_size(m.size(), 1); grad = 0; matrix u,v,w,f;