06fb33acf5d138615c8c3153ee5872550d3197ca,basicsr/test.py,,main,#,13
Before Change
init_dist(args.launcher, **opt["dist_params"])
else:
init_dist(args.launcher)
rank = torch.distributed.get_rank()
opt["rank"] = rank
make_exp_dirs(opt)
log_file = osp.join(opt["path"]["log"],
After Change
// random seed
seed = opt["manual_seed"]
if seed is None:
seed = random.randint(1, 10000)
opt["manual_seed"] = seed
logger.info(f"Random seed: {seed}")
set_random_seed(seed + rank)
torch.backends.cudnn.benchmark = True
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: xinntao/BasicSR
Commit Name: 06fb33acf5d138615c8c3153ee5872550d3197ca
Time: 2020-08-19
Author: wxt1994@126.com
File Name: basicsr/test.py
Class Name:
Method Name: main
Project Name: pytorch/fairseq
Commit Name: 1082ba352c5f1d524b1fcba43ee611280b169224
Time: 2018-09-25
Author: edunov@apache.org
File Name: fairseq/distributed_utils.py
Class Name:
Method Name: distributed_init