MCPcopy Index your code
hub / github.com/CompVis/diff2flow / seed_everything

Function seed_everything

diff2flow/helpers.py:135–141  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

133
134
135def seed_everything(seed):
136 torch.backends.cudnn.deterministic = True
137 torch.backends.cudnn.benchmark = False
138 torch.manual_seed(seed)
139 torch.cuda.manual_seed_all(seed)
140 np.random.seed(seed)
141 random.seed(seed)
142
143
144def bool2str(b):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected