The tolerance can also be 0.

This commit is contained in:
Ryan Curtin
2017-12-20 10:41:51 -05:00
parent 70d98e3ed8
commit 83128ddfcc
@@ -162,8 +162,8 @@ void mlpackMain()
ReportIgnoredParam({{ "test", false }}, "output_probabilities");
// Tolerance needs to be positive.
RequireParamValue<double>("tolerance", [](double x) { return x > 0.0; },
true, "tolerance must be positive");
RequireParamValue<double>("tolerance", [](double x) { return x >= 0.0; },
true, "tolerance must be positive or zero");
// Optimizer has to be L-BFGS or SGD.
RequireParamInSet<string>("optimizer", { "lbfgs", "sgd" },