MCPcopy Index your code
hub / github.com/davda54/sam / initialize

Function initialize

example/utility/initialize.py:5–13  ·  view source on GitHub ↗
(args, seed: int)

Source from the content-addressed store, hash-verified

3
4
5def initialize(args, seed: int):
6 random.seed(seed)
7 torch.manual_seed(seed)
8 torch.cuda.manual_seed(seed)
9 torch.cuda.manual_seed_all(seed)
10
11 torch.backends.cudnn.enabled = True
12 torch.backends.cudnn.benchmark = True
13 torch.backends.cudnn.deterministic = False

Callers 1

train.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected