Commit d5ce2967 authored by Cédric Traizet's avatar Cédric Traizet Committed by Cédric Traizet
Browse files

BUG: use the actual matrix type in at<T> instead of the output value type...

BUG: use the actual matrix type in at<T> instead of the output value type which result in a reinterpretation
parent aa9887c3
......@@ -206,7 +206,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::DoPredict(const In
// MODE CLASSIFICATION : find the highest response
float secondResponse = -1e10;
target[0] = m_MatrixOfLabels.at<TOutputValue>(0);
target[0] = m_MatrixOfLabels.at<float>(0);
unsigned int nbClasses = m_MatrixOfLabels.size[1];
for (unsigned itLabel = 1; itLabel < nbClasses; ++itLabel)
......@@ -217,7 +217,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::DoPredict(const In
secondResponse = maxResponse;
maxResponse = currentResponse;
target[0] = m_MatrixOfLabels.at<TOutputValue>(itLabel);
target[0] = m_MatrixOfLabels.at<float>(itLabel);
}
else
{
......
Supports Markdown
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