MCPcopy Index your code
hub / github.com/VisionXLab/OF-Diff / default

Function default

ldm/util.py:51–54  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

49
50
51def default(val, d):
52 if exists(val):
53 return val
54 return d() if isfunction(d) else d
55
56
57def mean_flat(tensor):

Callers 6

q_sampleMethod · 0.90
q_sampleMethod · 0.90
p_lossesMethod · 0.90
__init__Method · 0.90
p_lossesMethod · 0.90
p_lossesMethod · 0.90

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected