MCPcopy Create free account
hub / github.com/CompVis/zigma / sample

Method sample

transport/integrators.py:69–80  ·  view source on GitHub ↗

forward loop of sde

(self, init, model, **model_kwargs)

Source from the content-addressed store, hash-verified

67 return sampler
68
69 def sample(self, init, model, **model_kwargs):
70 """forward loop of sde"""
71 x = init
72 mean_x = init
73 samples = []
74 sampler = self.__forward_fn()
75 for ti in self.t[:-1]:
76 with th.no_grad():
77 x, mean_x = sampler(x, mean_x, ti, model, **model_kwargs)
78 samples.append(x)
79
80 return samples
81
82
83class ode:

Callers 3

mainFunction · 0.45
test_sd_1_5Function · 0.45
__getitem__Method · 0.45

Calls 1

__forward_fnMethod · 0.95

Tested by 1

test_sd_1_5Function · 0.36