MCPcopy Index your code
hub / github.com/geekcomputers/Python / step

Method step

ML/src/python/neuralforge/optim/optimizers.py:250–259  ·  view source on GitHub ↗
(self, closure=None)

Source from the content-addressed store, hash-verified

248 fast_p.data.copy_(slow)
249
250 def step(self, closure=None):
251 loss = self.optimizer.step(closure)
252
253 for group in self.param_groups:
254 group['counter'] += 1
255 if group['counter'] >= self.k:
256 self.update(group)
257 group['counter'] = 0
258
259 return loss
260
261 def state_dict(self):
262 return {

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
stepMethod · 0.45

Tested by

no test coverage detected