diff --git a/dlib/optimization/optimization_stop_strategies.h b/dlib/optimization/optimization_stop_strategies.h index 139b552d5..a0243cacf 100644 --- a/dlib/optimization/optimization_stop_strategies.h +++ b/dlib/optimization/optimization_stop_strategies.h @@ -44,8 +44,8 @@ namespace dlib ); } - const objective_delta_stop_strategy& be_verbose( - ) const + objective_delta_stop_strategy& be_verbose( + ) { _verbose = true; return *this; @@ -83,7 +83,7 @@ namespace dlib } private: - mutable bool _verbose; + bool _verbose; bool _been_used; double _min_delta; @@ -123,8 +123,8 @@ namespace dlib ); } - const gradient_norm_stop_strategy& be_verbose( - ) const + gradient_norm_stop_strategy& be_verbose( + ) { _verbose = true; return *this; @@ -158,7 +158,7 @@ namespace dlib } private: - mutable bool _verbose; + bool _verbose; double _min_norm; unsigned long _max_iter; diff --git a/dlib/optimization/optimization_stop_strategies_abstract.h b/dlib/optimization/optimization_stop_strategies_abstract.h index c5f5c7526..6a999f8d9 100644 --- a/dlib/optimization/optimization_stop_strategies_abstract.h +++ b/dlib/optimization/optimization_stop_strategies_abstract.h @@ -53,8 +53,8 @@ namespace dlib executed. !*/ - const objective_delta_stop_strategy& be_verbose( - ) const; + objective_delta_stop_strategy& be_verbose( + ); /*! ensures - causes this object to print status messages to standard out @@ -120,8 +120,8 @@ namespace dlib max_iter iterations has been executed. !*/ - const gradient_norm_stop_strategy& be_verbose( - ) const; + gradient_norm_stop_strategy& be_verbose( + ); /*! ensures - causes this object to print status messages to standard out