MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / run_step

Method run_step

src/diffusion/train_util.py:163–172  ·  view source on GitHub ↗
(self, batch, cond)

Source from the content-addressed store, hash-verified

161 self.save()
162
163 def run_step(self, batch, cond):
164 self.forward_backward(batch, cond)
165 took_step = self.mp_trainer.optimize(self.opt)
166 if took_step:
167 self._update_ema()
168 self._anneal_lr()
169 self.log_step()
170
171 if self.step % 5000 == 0:
172 self._sample_and_visualize()
173
174 def _sample_and_visualize(self):
175 print("Sampling and visualizing...")

Callers 1

run_loopMethod · 0.95

Calls 6

forward_backwardMethod · 0.95
_update_emaMethod · 0.95
_anneal_lrMethod · 0.95
log_stepMethod · 0.95
_sample_and_visualizeMethod · 0.95
optimizeMethod · 0.80

Tested by

no test coverage detected