MCPcopy Index your code
hub / github.com/adobe-research/custom-diffusion / shared_step

Method shared_step

src/model.py:298–301  ·  view source on GitHub ↗
(self, batch, **kwargs)

Source from the content-addressed store, hash-verified

296 return loss
297
298 def shared_step(self, batch, **kwargs):
299 x, c, mask = self.get_input_withmask(batch, **kwargs)
300 loss = self(x, c, mask=mask)
301 return loss
302
303 @torch.no_grad()
304 def log_images(self, batch, N=8, n_row=4, sample=True, ddim_steps=200, ddim_eta=1., return_keys=None,

Callers 1

training_stepMethod · 0.95

Calls 1

get_input_withmaskMethod · 0.95

Tested by

no test coverage detected