From 1d13014539163f0d37bb2f5d84c5b60a9b3cd8bb Mon Sep 17 00:00:00 2001 From: Manish Date: Wed, 2 May 2018 16:41:53 +0530 Subject: [PATCH] minor update --- src/mlpack/methods/lsh/lsh_main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mlpack/methods/lsh/lsh_main.cpp b/src/mlpack/methods/lsh/lsh_main.cpp index fdf34d3cf8..cd8e810492 100644 --- a/src/mlpack/methods/lsh/lsh_main.cpp +++ b/src/mlpack/methods/lsh/lsh_main.cpp @@ -201,6 +201,12 @@ static void mlpackMain() // Load the true neighbors. arma::Mat trueNeighbors = std::move(CLI::GetParam>("true_neighbors")); + + if (trueNeighbors.n_rows != neighbors.n_rows || + trueNeighbors.n_cols != neighbors.n_cols) + Log::Fatal << "The true neighbors file must have the same number of " + << "values as the set of neighbors being queried!" << endl; + Log::Info << "Using true neighbor indices from '" << CLI::GetPrintableParam>("true_neighbors") << "'." << endl;