[mlpack-git] mlpack-2.0.x: Correct warning for no output. (02d15d1)

gitdub at mlpack.org gitdub at mlpack.org
Wed Jul 20 15:31:47 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : mlpack-2.0.x
Link       : https://github.com/mlpack/mlpack/compare/e434bc4ac042534529a2a440a44d86935b4d7164...fc4195d27bb9e642356a384d1fa6fe10cbdf89a6

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

commit 02d15d1874497b272e07f82bbed6e7a948aa1f15
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Jul 13 16:04:56 2016 -0400

    Correct warning for no output.


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

02d15d1874497b272e07f82bbed6e7a948aa1f15
 src/mlpack/methods/hmm/hmm_generate_main.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/methods/hmm/hmm_generate_main.cpp b/src/mlpack/methods/hmm/hmm_generate_main.cpp
index 860848d..6687f46 100644
--- a/src/mlpack/methods/hmm/hmm_generate_main.cpp
+++ b/src/mlpack/methods/hmm/hmm_generate_main.cpp
@@ -83,9 +83,9 @@ int main(int argc, char** argv)
   // Parse command line options.
   CLI::ParseCommandLine(argc, argv);
 
-  if (CLI::HasParam("output_file"))
-    Log::Warn << "--output_file (-o) is not specified; no results will be "
-        << "saved!" << endl;
+  if (!CLI::HasParam("output_file") && !CLI::HasParam("state_file"))
+    Log::Warn << "Neither --output_file nor --state_file are specified; no "
+        << "output will be saved!" << endl;
 
   // Set random seed.
   if (CLI::GetParam<int>("seed") != 0)




More information about the mlpack-git mailing list