Commit a1fbb467 authored by Cédric Traizet's avatar 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 9ba20a73
Pipeline #7434 failed with stages
in 67 minutes and 50 seconds
...@@ -206,7 +206,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::DoPredict(const In ...@@ -206,7 +206,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::DoPredict(const In
// MODE CLASSIFICATION : find the highest response // MODE CLASSIFICATION : find the highest response
float secondResponse = -1e10; float secondResponse = -1e10;
target[0] = m_MatrixOfLabels.at<TOutputValue>(0); target[0] = m_MatrixOfLabels.at<float>(0);
unsigned int nbClasses = m_MatrixOfLabels.size[1]; unsigned int nbClasses = m_MatrixOfLabels.size[1];
for (unsigned itLabel = 1; itLabel < nbClasses; ++itLabel) for (unsigned itLabel = 1; itLabel < nbClasses; ++itLabel)
...@@ -217,7 +217,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::DoPredict(const In ...@@ -217,7 +217,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::DoPredict(const In
secondResponse = maxResponse; secondResponse = maxResponse;
maxResponse = currentResponse; maxResponse = currentResponse;
target[0] = m_MatrixOfLabels.at<TOutputValue>(itLabel); target[0] = m_MatrixOfLabels.at<float>(itLabel);
} }
else 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