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

Function exists

dalle_pytorch/dalle_pytorch.py:16–17  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

14# helpers
15
16def exists(val):
17 return val is not None
18
19def default(val, d):
20 return val if exists(val) else d

Callers 6

defaultFunction · 0.70
normMethod · 0.70
forwardMethod · 0.70
generate_imagesMethod · 0.70
forwardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected