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

Method call

python/singa/opt.py:61–68  ·  view source on GitHub ↗
(self, step)

Source from the content-addressed store, hash-verified

59 self.staircase = staircase
60
61 def call(self, step):
62 if self.staircase:
63 s = step // self.decay_steps
64 else:
65 s = step / self.decay_steps
66 ret = Tensor((1,), s.device)
67 ret.set_value(self.decay_rate)
68 return self.init_value * tensor.pow(ret, s)
69
70
71class Optimizer(object):

Callers

nothing calls this directly

Calls 2

set_valueMethod · 0.95
TensorClass · 0.90

Tested by

no test coverage detected