Construct a learning rate schedule */
| 48 | |
| 49 | /** Construct a learning rate schedule */ |
| 50 | LRSchedule(const std::string &_type = "constant") : type(_type) { |
| 51 | CHECK(type == "linear" || type == "constant") << "Invalid schedule `" << type << "`"; |
| 52 | if (type == "linear") |
| 53 | schedule_function = linear_schedule; |
| 54 | if (type == "constant") |
| 55 | schedule_function = constant_schedule; |
| 56 | } |
| 57 | |
| 58 | /** Construct a learning rate from custom function */ |
| 59 | LRSchedule(const ScheduleFunction &_schedule_function) : |
nothing calls this directly
no outgoing calls
no test coverage detected