MCPcopy
hub / github.com/LuChengTHU/dpm-solver / discretize

Method discretize

examples/score_sde_jax/sde_lib.py:104–109  ·  view source on GitHub ↗

Create discretized iteration rules for the reverse diffusion sampler.

(self, x, t)

Source from the content-addressed store, hash-verified

102 return drift, diffusion
103
104 def discretize(self, x, t):
105 """Create discretized iteration rules for the reverse diffusion sampler."""
106 f, G = discretize_fn(x, t)
107 rev_f = f - batch_mul(G ** 2, score_fn(x, t) * (0.5 if self.probability_flow else 1.))
108 rev_G = jnp.zeros_like(G) if self.probability_flow else G
109 return rev_f, rev_G
110
111 return RSDE()
112

Callers

nothing calls this directly

Calls 2

batch_mulFunction · 0.90
score_fnFunction · 0.50

Tested by

no test coverage detected