Verified Commit c44f69d1 authored by Yaoyao Liu's avatar Yaoyao Liu
Browse files

Update the code

parent c5e30041
......@@ -248,13 +248,6 @@ def _set_seed(seed, nb_threads, no_benchmark, detect_anomaly):
logger.info("Set seed {}".format(seed))
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
if no_benchmark:
logger.warning("CUDA algos are not determinists but faster!")
else:
logger.warning("CUDA algos are determinists but very slow!")
torch.backends.cudnn.deterministic = not no_benchmark # This will slow down training.
torch.set_num_threads(nb_threads)
if detect_anomaly:
logger.info("Will detect autograd anomaly.")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment