[mlpack-git] master: Add additional parameter validation. (5ba11bc)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 16 14:13:27 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/31c10fef76ac1d85c6415c92d2ccd429c430105f...5ba11bc90223b55eecd5da4cfbe86c8fc40637a5

>---------------------------------------------------------------

commit 5ba11bc90223b55eecd5da4cfbe86c8fc40637a5
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Dec 16 19:13:14 2015 +0000

    Add additional parameter validation.


>---------------------------------------------------------------

5ba11bc90223b55eecd5da4cfbe86c8fc40637a5
 src/mlpack/methods/sparse_coding/sparse_coding_main.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mlpack/methods/sparse_coding/sparse_coding_main.cpp b/src/mlpack/methods/sparse_coding/sparse_coding_main.cpp
index 72bc2f5..4f2324f 100644
--- a/src/mlpack/methods/sparse_coding/sparse_coding_main.cpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding_main.cpp
@@ -112,6 +112,10 @@ int main(int argc, char* argv[])
         << "--output_model_file (-M) are specified; no output will be saved."
         << endl;
 
+  if (CLI::HasParam("codes_file") && !CLI::HasParam("test_file"))
+    Log::Fatal << "--codes_file (-c) is specified, but no test matrix ("
+        << "specified with --test_file or -T) is given to encode!" << endl;
+
   if (!CLI::HasParam("training_file"))
   {
     if (CLI::HasParam("atoms"))



More information about the mlpack-git mailing list