MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / after_train_iter

Method after_train_iter

mogen/utils/dist_utils.py:51–56  ·  view source on GitHub ↗
(self, runner)

Source from the content-addressed store, hash-verified

49 self.bucket_size_mb = bucket_size_mb
50
51 def after_train_iter(self, runner):
52 runner.optimizer.zero_grad()
53 runner.outputs['loss'].backward()
54 if self.grad_clip is not None:
55 self.clip_grads(runner.model.parameters())
56 runner.optimizer.step()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected