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

Method step

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

Source from the content-addressed store, hash-verified

310 singa.Axpy(minus_lr.data, param_grad.data, param_value.data)
311
312 def step(self):
313 # increment step counter, lr and moment
314 super().step()
315 mom_value = self.momentum(self.step_counter).as_type(self.dtype)
316 dam_value = self.dampening(self.step_counter).as_type(self.dtype)
317 decay_value = self.weight_decay(self.step_counter).as_type(self.dtype)
318 self.mom_value.copy_from(mom_value)
319 self.dam_value.copy_from(dam_value)
320 self.decay_value.copy_from(decay_value)
321
322 def get_states(self):
323 states = super().get_states()

Callers 12

_retraining_helperMethod · 0.95
stepMethod · 0.45
stepMethod · 0.45
stepMethod · 0.45
backward_and_updateMethod · 0.45

Calls 2

as_typeMethod · 0.45
copy_fromMethod · 0.45