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

Method step

python/singa/opt.py:662–670  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

660 singa.Axpy(minus_lr.data, tmp.data, param_value.data)
661
662 def step(self):
663 # increment step counter, lr and moment
664 super().step()
665 decay_value = self.weight_decay(self.step_counter)
666 beta_1_value = self.beta_1(self.step_counter)
667 beta_2_value = self.beta_2(self.step_counter)
668 self.decay_value.copy_from(decay_value)
669 self.beta_1_value.copy_from(beta_1_value)
670 self.beta_2_value.copy_from(beta_2_value)
671
672 def get_states(self):
673 states = super().get_states()

Callers

nothing calls this directly

Calls 2

stepMethod · 0.45
copy_fromMethod · 0.45

Tested by

no test coverage detected