MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _set_randomseed

Method _set_randomseed

PATH/core/solvers/solver.py:325–330  ·  view source on GitHub ↗
(self, seed)

Source from the content-addressed store, hash-verified

323 tmp.input_var[k] = torch.autograd.Variable(v.cuda())
324
325 def _set_randomseed(self, seed):
326 random.seed(seed)
327 np.random.seed(seed)
328 torch.manual_seed(seed)
329 torch.cuda.manual_seed(seed)
330 torch.cuda.manual_seed_all(seed)
331
332 def forward(self):
333 ## set random seed with current_step at each iteration

Callers 2

forwardMethod · 0.95
forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected