[mlpack-git] mlpack-2.x: Don't do infinite iterations. (Fix non-terminating test.) (83538be)

gitdub at mlpack.org gitdub at mlpack.org
Sun Jun 19 14:58:54 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : mlpack-2.x
Link       : https://github.com/mlpack/mlpack/compare/6815ea7b3303b4979dbbbfc0f7c9a489955fabaa...ce197268ea6be93bb371145689671b25a42dec4a

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

commit 83538be29236f1b90dc974724aad998a79345f1e
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.)


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

83538be29236f1b90dc974724aad998a79345f1e
 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 fe151e8..50f24db 100644
--- a/src/mlpack/core/optimizers/lbfgs/lbfgs.hpp
+++ b/src/mlpack/core/optimizers/lbfgs/lbfgs.hpp
@@ -53,7 +53,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.
@@ -66,7 +66,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