MCPcopy Create free account
hub / github.com/294coder/Dif-PAN / default

Function default

diffusion/diffusion_ddpm_pan.py:67–70  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

65
66
67def default(val, d):
68 if exists(val):
69 return val
70 return d() if isfunction(d) else d
71
72
73def extract(a, t, x_shape):

Callers 3

interpolateMethod · 0.70
q_sampleMethod · 0.70
p_lossesMethod · 0.70

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected