MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / get_v

Method get_v

ldm/models/diffusion/ddpm.py:368–372  ·  view source on GitHub ↗
(self, x, noise, t)

Source from the content-addressed store, hash-verified

366 extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.shape) * noise)
367
368 def get_v(self, x, noise, t):
369 return (
370 extract_into_tensor(self.sqrt_alphas_cumprod, t, x.shape) * noise -
371 extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x.shape) * x
372 )
373
374 def get_loss(self, pred, target, mean=True):
375 if self.loss_type == 'l1':

Callers 3

p_lossesMethod · 0.95
p_lossesMethod · 0.80
p_lossesMethod · 0.80

Calls 1

extract_into_tensorFunction · 0.90

Tested by

no test coverage detected