d646a4a8fc315ee0146365ba86c4f8afd9cfdb2c,fairseq/multiprocessing_trainer.py,MultiprocessingTrainer,_async_init,#MultiprocessingTrainer#Any#Any#Any#Any#Any#Any#,54
Before Change
nccl.initialize(self.num_replicas, nccl_uid, device_id)
// copy model and criterion to current device
self.model = model.cuda()
self.criterion = criterion.cuda()
// initialize optimizer
self.optimizer = NAG(self.model.parameters(), lr=self.args.lr,
momentum=self.args.momentum,
weight_decay=self.args.weight_decay)
self.flat_grads = None
self.loss = None
// initialize LR scheduler
After Change
self.criterion = criterion.cuda()
// initialize optimizer
self.optimizer = self._build_optimizer()
self.flat_grads = None
self.loss = None
// initialize LR scheduler
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: pytorch/fairseq
Commit Name: d646a4a8fc315ee0146365ba86c4f8afd9cfdb2c
Time: 2017-10-19
Author: myleott@fb.com
File Name: fairseq/multiprocessing_trainer.py
Class Name: MultiprocessingTrainer
Method Name: _async_init
Project Name: pytorch/fairseq
Commit Name: d646a4a8fc315ee0146365ba86c4f8afd9cfdb2c
Time: 2017-10-19
Author: myleott@fb.com
File Name: fairseq/multiprocessing_trainer.py
Class Name: MultiprocessingTrainer
Method Name: _async_init
Project Name: elbayadm/attn2d
Commit Name: 7ee1d28458da68a76903a38dda5164e6abcaebf1
Time: 2018-06-15
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: __init__