[mlpack-git] master: Don't do infinite iterations. (Fix non-terminating test.) (afaef85)
gitdub at mlpack.org
gitdub at mlpack.org
Mon Jun 20 09:03:36 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/779556fed748819a18cc898d9a6f69900740ef23...20b4b2736cedb8c44c03e2af3f67f8a5af00927c
>---------------------------------------------------------------
commit afaef852b9780d9a722a91ad4a5e467710c99493
Author: Ryan Curtin <ryan at ratml.org>
Date: Sun Jun 19 14:58:18 2016 -0400
Don't do infinite iterations.
(Fix non-terminating test.)
>---------------------------------------------------------------
afaef852b9780d9a722a91ad4a5e467710c99493
src/mlpack/core/optimizers/lbfgs/lbfgs.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/core/optimizers/lbfgs/lbfgs.hpp b/src/mlpack/core/optimizers/lbfgs/lbfgs.hpp
index 1d90a9c..689d3be 100644
--- a/src/mlpack/core/optimizers/lbfgs/lbfgs.hpp
+++ b/src/mlpack/core/optimizers/lbfgs/lbfgs.hpp
@@ -38,7 +38,7 @@ class L_BFGS
* @param function Instance of function to be optimized.
* @param numBasis Number of memory points to be stored (default 5).
* @param maxIterations Maximum number of iterations for the optimization
- * (default 0 -- may run indefinitely).
+ * (0 means no limit and may run indefinitely).
* @param armijoConstant Controls the accuracy of the line search routine for
* determining the Armijo condition.
* @param wolfe Parameter for detecting the Wolfe condition.
@@ -51,7 +51,7 @@ class L_BFGS
*/
L_BFGS(FunctionType& function,
const size_t numBasis = 10, /* same default as scipy */
- const size_t maxIterations = 0, /* run forever */
+ const size_t maxIterations = 10000, /* many but not infinite */
const double armijoConstant = 1e-4,
const double wolfe = 0.9,
const double minGradientNorm = 1e-6,
More information about the mlpack-git
mailing list