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

Method set_states

python/singa/opt.py:98–101  ·  view source on GitHub ↗
(self, states)

Source from the content-addressed store, hash-verified

96 return {'step_counter': tensor.to_numpy(self.step_counter)[0]}
97
98 def set_states(self, states):
99 self.step_counter = Tensor((1,))
100 self.step_counter.set_value(states['step_counter'])
101 self.lr_value = self.lr(self.step_counter)
102
103 def __call__(self, loss):
104 self.call(loss)

Callers 1

test_optimizerMethod · 0.95

Calls 2

TensorClass · 0.90
set_valueMethod · 0.45

Tested by 1

test_optimizerMethod · 0.76