The argument function returns the momentum value given the current running step (i.e., iterations/mini-batches).
| 185 | /// The argument function returns the momentum value given the current running |
| 186 | /// step (i.e., iterations/mini-batches). |
| 187 | void SetMomentumGenerator(std::function<float(int)> func) { |
| 188 | momentum_generator_ = func; |
| 189 | } |
| 190 | |
| 191 | private: |
| 192 | std::unordered_map<string, Tensor> history_gradient_; |