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

Method check_interval

diff2flow/flow.py:241–253  ·  view source on GitHub ↗
(self, diffusion_form="sigma", reverse=False, last_step_size=0.04)

Source from the content-addressed store, hash-verified

239 return score_out
240
241 def check_interval(self, diffusion_form="sigma", reverse=False, last_step_size=0.04):
242 t0 = 0
243 t1 = 1
244 eps = self.sample_eps
245 if (isinstance(self.schedule, GVPSchedule) or isinstance(self.schedule, LinearSchedule)):
246 # avoid numerical issue by taking a first semi-implicit step
247 t0 = eps if diffusion_form == "SBDM" else 0
248 t1 = 1 - eps if last_step_size == 0 else 1 - last_step_size
249
250 if reverse:
251 t0, t1 = 1 - t0, 1 - t1
252
253 return t0, t1
254
255 def __get_sde_diffusion_and_drift(
256 self,

Callers 1

sampleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected