From fb49f0ceab5cda672c095bffd3d20f2be67c9323 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 3 Jan 2016 12:03:00 -0500 Subject: [PATCH] Fixed a bug where the trainer didn't initialize the solvers unless you explicitly gave it a solver. --- dlib/dnn/trainer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlib/dnn/trainer.h b/dlib/dnn/trainer.h index 1341b8871..2d718739a 100644 --- a/dlib/dnn/trainer.h +++ b/dlib/dnn/trainer.h @@ -35,12 +35,12 @@ namespace dlib typedef typename net_type::input_type input_type; dnn_trainer( - ) : job_pipe(0) + ) : job_pipe(0), solvers(net_type::num_layers) { init(); } - explicit dnn_trainer(const net_type& net_) : job_pipe(0), net(net_) + explicit dnn_trainer(const net_type& net_) : job_pipe(0), net(net_), solvers(net_type::num_layers) { init(); }