MCPcopy Create free account
hub / github.com/geekcomputers/Python / set_seed

Function set_seed

ML/train.py:19–25  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

17from src.python.neuralforge.utils.logger import Logger
18
19def set_seed(seed):
20 random.seed(seed)
21 np.random.seed(seed)
22 torch.manual_seed(seed)
23 torch.cuda.manual_seed_all(seed)
24 torch.backends.cudnn.deterministic = True
25 torch.backends.cudnn.benchmark = False
26
27def create_simple_model(num_classes=10):
28 return nn.Sequential(

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected