MCPcopy Create free account
hub / github.com/CompVis/diff2flow / training_losses

Method training_losses

diff2flow/diffusion.py:107–114  ·  view source on GitHub ↗
(self, x1: torch.Tensor, x0: torch.Tensor = None, **cond_kwargs)

Source from the content-addressed store, hash-verified

105 return self.net(x, t, **kwargs)
106
107 def training_losses(self, x1: torch.Tensor, x0: torch.Tensor = None, **cond_kwargs):
108 loss, _ = self.diffusion.training_losses(
109 model=self.net,
110 x_start=x1,
111 model_kwargs=cond_kwargs,
112 x_noise=x0,
113 )
114 return loss
115
116 def generate(self, x: torch.Tensor, sample_kwargs=None, reverse=False, return_intermediates=False, **kwargs):
117 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected