train_svmsgd.cpp : float response

responses must be float, else we trigger an assertion in line 150
pull/6254/head
berak 9 years ago
parent fbc221d334
commit 79ac072e6c
  1. 2
      samples/cpp/train_svmsgd.cpp

@ -167,7 +167,7 @@ void addPointRetrainAndRedraw(Data &data, int x, int y, int response)
currentSample.at<float>(0,0) = (float)x;
currentSample.at<float>(0,1) = (float)y;
data.samples.push_back(currentSample);
data.responses.push_back(response);
data.responses.push_back(static_cast<float>(response));
Mat weights(1, 2, CV_32FC1);
float shift = 0;

Loading…
Cancel
Save