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

Function set_seed

ML/src/python/neuralforge/cli/train.py:17–23  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected