MCPcopy
hub / github.com/lucidrains/DALLE-pytorch / default

Function default

dalle_pytorch/dalle_pytorch.py:19–20  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

17 return val is not None
18
19def default(val, d):
20 return val if exists(val) else d
21
22class always():
23 def __init__(self, val):

Callers 2

forwardMethod · 0.70
generate_imagesMethod · 0.70

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected