MCPcopy Create free account
hub / github.com/DIVE128/DMVSNet / setup_seed

Function setup_seed

tools.py:9–15  ·  view source on GitHub ↗
(seed=3407)

Source from the content-addressed store, hash-verified

7from torch.optim.lr_scheduler import LambdaLR
8
9def setup_seed(seed=3407):
10 os.environ["PYTHONHASHSEED"]=str(seed)
11 torch.manual_seed(seed)
12 torch.cuda.manual_seed(seed)
13 torch.cuda.manual_seed_all(seed)
14
15 np.random.seed(seed)
16
17
18class DictAverageMeter(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected