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

Method step

examples/cnn_ms/train_ms_model.py:185–193  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

183 singa.Axpy(minus_lr.data, param_grad.data, param_value.data)
184
185 def step(self):
186 # increment step counter, lr and moment
187 super().step()
188 mom_value = self.momentum(self.step_counter).as_type(self.dtype)
189 dam_value = self.dampening(self.step_counter).as_type(self.dtype)
190 decay_value = self.weight_decay(self.step_counter).as_type(self.dtype)
191 self.mom_value.copy_from(mom_value)
192 self.dam_value.copy_from(dam_value)
193 self.decay_value.copy_from(decay_value)
194
195 def get_states(self):
196 states = super().get_states()

Callers 1

__call__Method · 0.45

Calls 2

as_typeMethod · 0.45
copy_fromMethod · 0.45

Tested by

no test coverage detected