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

Method Setup

src/model/optimizer/sgd.cc:24–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace singa {
23
24void SGD::Setup(const OptimizerConf& conf) {
25 Optimizer::Setup(conf);
26 if (conf.has_momentum()) {
27 float m = conf.momentum();
28 SetMomentumGenerator([m](int step) { return m; });
29 }
30}
31
32// history = history * momentum + grad * lr
33// value = value - history

Callers

nothing calls this directly

Calls 1

SetupFunction · 0.85

Tested by

no test coverage detected