diff options
Diffstat (limited to 'training/online_optimizer.cc')
-rw-r--r-- | training/online_optimizer.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/training/online_optimizer.cc b/training/online_optimizer.cc new file mode 100644 index 00000000..db55c95e --- /dev/null +++ b/training/online_optimizer.cc @@ -0,0 +1,14 @@ +#include "online_optimizer.h" + +LearningRateSchedule::~LearningRateSchedule() {} + +double StandardLearningRate::eta(int k) const { + return eta_0_ / (1.0 + k / N_); +} + +double ExponentialDecayLearningRate::eta(int k) const { + return eta_0_ * pow(alpha_, k / N_); +} + +OnlineOptimizer::~OnlineOptimizer() {} + |