@@ -88,6 +88,8 @@ class AdamType
8888 * function is visited in linear order.
8989 * @param resetPolicy If true, parameters are reset before every Optimize
9090 * call; otherwise, their values are retained.
91+ * @param exactObjective Calculate the exact objective (Default: estimate the
92+ * final objective obtained on the last pass over the data).
9193 */
9294 AdamType (const double stepSize = 0.001 ,
9395 const size_t batchSize = 32 ,
@@ -97,7 +99,8 @@ class AdamType
9799 const size_t maxIterations = 100000 ,
98100 const double tolerance = 1e-5 ,
99101 const bool shuffle = true ,
100- const bool resetPolicy = true );
102+ const bool resetPolicy = true ,
103+ const bool exactObjective = false );
101104
102105 /* *
103106 * Optimize the given function using Adam. The given starting point will be
@@ -155,6 +158,11 @@ class AdamType
155158 // ! Modify whether or not the individual functions are shuffled.
156159 bool & Shuffle () { return optimizer.Shuffle (); }
157160
161+ // ! Get whether or not the actual objective is calculated.
162+ bool ExactObjective () const { return optimizer.ExactObjective (); }
163+ // ! Modify whether or not the actual objective is calculated.
164+ bool & ExactObjective () { return optimizer.ExactObjective (); }
165+
158166 // ! Get whether or not the update policy parameters
159167 // ! are reset before Optimize call.
160168 bool ResetPolicy () const { return optimizer.ResetPolicy (); }
0 commit comments