summaryrefslogtreecommitdiff
path: root/training/optimize.cc
diff options
context:
space:
mode:
Diffstat (limited to 'training/optimize.cc')
-rw-r--r--training/optimize.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/training/optimize.cc b/training/optimize.cc
index f0740d5c..41ac90d8 100644
--- a/training/optimize.cc
+++ b/training/optimize.cc
@@ -96,6 +96,7 @@ void LBFGSOptimizer::OptimizeImpl(const double& obj,
const vector<double>& g,
vector<double>* x) {
opt_.run(&(*x)[0], obj, &g[0]);
- cerr << opt_ << endl;
+ if (!opt_.requests_f_and_g()) opt_.run(&(*x)[0], obj, &g[0]);
+ // cerr << opt_ << endl;
}