diff --git a/src/ves/Opt_BachAveragedSGD.cpp b/src/ves/Opt_BachAveragedSGD.cpp index eeaffda49780fdf2609d7182265c98b23dd98465..28a4ae5de277668b9b8b08043660971c4047ad4f 100644 --- a/src/ves/Opt_BachAveragedSGD.cpp +++ b/src/ves/Opt_BachAveragedSGD.cpp @@ -206,7 +206,7 @@ void Opt_BachAveragedSGD::registerKeywords(Keywords& keys) { Optimizer::useHessianKeywords(keys); Optimizer::useMaskKeywords(keys); Optimizer::useRestartKeywords(keys); - // Optimizer::useMonitorAveragesKeywords(keys); + Optimizer::useMonitorAverageGradientKeywords(keys); Optimizer::useDynamicTargetDistributionKeywords(keys); keys.add("hidden","COMBINED_GRADIENT_FILE","the name of output file for the combined gradient (gradient + Hessian term)"); keys.add("hidden","COMBINED_GRADIENT_OUTPUT","how often the combined gradient should be written to file. This parameter is given as the number of bias iterations. It is by default 100 if COMBINED_GRADIENT_FILE is specficed"); diff --git a/src/ves/Opt_Dummy.cpp b/src/ves/Opt_Dummy.cpp index 35bd5ce261921209e2d9ce4a9213abab3a5a7f35..795b4502d874a668b2b05a191b26e88f5a4f9e3e 100644 --- a/src/ves/Opt_Dummy.cpp +++ b/src/ves/Opt_Dummy.cpp @@ -90,6 +90,7 @@ void Opt_Dummy::registerKeywords(Keywords& keys) { // Optimizer::useMultipleWalkersKeywords(keys); Optimizer::useHessianKeywords(keys); + Optimizer::useMonitorAverageGradientKeywords(keys); keys.addFlag("MONITOR_HESSIAN",false,"also monitor the Hessian"); } diff --git a/src/ves/Optimizer.cpp b/src/ves/Optimizer.cpp index 04433f296c70798c752ff1779115c68d5dbb23b4..62240416a2262a49e4656c84015693b421d27bf4 100644 --- a/src/ves/Optimizer.cpp +++ b/src/ves/Optimizer.cpp @@ -849,7 +849,7 @@ void Optimizer::registerKeywords( Keywords& keys ) { keys.addFlag("MONITOR_INSTANTANEOUS_GRADIENT",false,"if the instantaneous gradient should be monitored."); // keys.reserveFlag("MONITOR_AVERAGE_GRADIENT",false,"if the averaged gradient should be monitored."); - keys.reserve("optional","MONITOR_AVERAGES_EXP_DECAY","use an exponentially decaying averaging with a given time constant when monitoring the averaged gradient"); + keys.reserve("optional","MONITOR_AVERAGES_GRADIENT_EXP_DECAY","use an exponentially decaying averaging with a given time constant when monitoring the averaged gradient"); // keys.reserve("optional","TARGETDIST_STRIDE","stride for updating a target distribution that is iteratively updated during the optimization. Note that the value is given in terms of coefficent iterations."); keys.reserve("optional","TARGETDIST_OUTPUT","how often the dynamic target distribution(s) should be written out to file. Note that the value is given in terms of coefficent iterations."); @@ -913,9 +913,9 @@ void Optimizer::useRestartKeywords(Keywords& keys) { } -void Optimizer::useMonitorAveragesKeywords(Keywords& keys) { +void Optimizer::useMonitorAverageGradientKeywords(Keywords& keys) { keys.use("MONITOR_AVERAGE_GRADIENT"); - keys.use("MONITOR_AVERAGES_EXP_DECAY"); + keys.use("MONITOR_AVERAGES_GRADIENT_EXP_DECAY"); keys.addOutputComponent("avergradrms","MONITOR_AVERAGE_GRADIENT","the root mean square value of the averaged coefficent gradient. For multiple biases this component is labeled using the number of the bias as gradrms-#."); keys.addOutputComponent("avergradmax","MONITOR_AVERAGE_GRADIENT","the largest absolute value of the averaged coefficent gradient. For multiple biases this component is labeled using the number of the bias as gradmax-#."); } diff --git a/src/ves/Optimizer.h b/src/ves/Optimizer.h index d10bc4a6f03248d1053076c31cc76644d6c3364d..c0209c214e47bd2d51071519396e921b7b3bbd11 100644 --- a/src/ves/Optimizer.h +++ b/src/ves/Optimizer.h @@ -163,7 +163,7 @@ public: static void useDynamicStepSizeKeywords(Keywords&); static void useMaskKeywords(Keywords&); static void useRestartKeywords(Keywords&); - static void useMonitorAveragesKeywords(Keywords&); + static void useMonitorAverageGradientKeywords(Keywords&); static void useDynamicTargetDistributionKeywords(Keywords&); static void useReweightFactorKeywords(Keywords&); //