MCPcopy Create free account
hub / github.com/apache/singa / SetLearningRateGenerator

Method SetLearningRateGenerator

include/singa/model/optimizer.h:81–83  ·  view source on GitHub ↗

The argument is a function that returns the learning rate given the current step (i.e., curren running iteration).

Source from the content-addressed store, hash-verified

79 /// The argument is a function that returns the learning rate given the
80 /// current step (i.e., curren running iteration).
81 void SetLearningRateGenerator(function<float(int)> func) {
82 learning_rate_generator_ = func;
83 }
84 float GetLearningRate(int step) {
85 if (learning_rate_generator_)
86 return learning_rate_generator_(step);

Callers 4

TrainFunction · 0.80
TrainFunction · 0.80
TrainFunction · 0.80
TrainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected