MCPcopy Create free account
hub / github.com/FreedomGu/Diffportrait360 / set_seed

Function set_seed

diffportrait360_release/code/utils/utils.py:25–29  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

23
24
25def set_seed(seed):
26 random.seed(seed)
27 np.random.seed(seed)
28 torch.manual_seed(seed)
29 torch.cuda.manual_seed_all(seed)
30
31# count # of param for a list of module
32def count_param(module_list):

Callers 3

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected