MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / default

Function default

ldm/modules/attention.py:31–34  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

29
30
31def default(val, d):
32 if exists(val):
33 return val
34 return d() if isfunction(d) else d
35
36
37def max_neg_value(t):

Callers 6

__init__Method · 0.70
__init__Method · 0.70
forwardMethod · 0.70
__init__Method · 0.70
forwardMethod · 0.70

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected