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

Method predict_eps_from_xstart

diff2flow/ddpm.py:287–291  ·  view source on GitHub ↗
(self, x_t, t, pred_xstart)

Source from the content-addressed store, hash-verified

285 )
286
287 def predict_eps_from_xstart(self, x_t, t, pred_xstart):
288 return (
289 extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t
290 - pred_xstart
291 ) / extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape)
292
293 def q_posterior(self, x_start, x_t, t):
294 """

Callers 1

calc_bpd_loopMethod · 0.95

Calls 1

extract_into_tensorFunction · 0.70

Tested by

no test coverage detected