diff --git a/src/mlpack/methods/perceptron/perceptron_impl.hpp b/src/mlpack/methods/perceptron/perceptron_impl.hpp index 46312f542f9..c03533889cb 100644 --- a/src/mlpack/methods/perceptron/perceptron_impl.hpp +++ b/src/mlpack/methods/perceptron/perceptron_impl.hpp @@ -322,7 +322,7 @@ void Perceptron::Classify( for (size_t i = 0; i < test.n_cols; ++i) { tempLabelMat = weights.t() * test.col(i) + biases; - maxIndex = tempLabelMat.index_max(); + tempLabelMat.max(maxIndex); predictedLabels(i) = maxIndex; } }