7ee1d28458da68a76903a38dda5164e6abcaebf1,fairseq/trainer.py,Trainer,__init__,#Trainer#Any#Any#Any#,30
Before Change
self.criterion = criterion.cuda()
// initialize optimizer and LR scheduler
self.optimizer = optim.build_optimizer(self.args, self.model.parameters())
self.lr_scheduler = lr_scheduler.build_lr_scheduler(self.args, self.optimizer)
// initialize meters
self.meters = OrderedDict()
self.meters["train_loss"] = AverageMeter()
After Change
self.criterion = criterion.cuda()
// initialize optimizer and LR scheduler
self._build_optimizer()
// initialize meters
self.meters = OrderedDict()
self.meters["train_loss"] = AverageMeter()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 12
Instances
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__
Project Name: pytorch/fairseq
Commit Name: 7ee1d28458da68a76903a38dda5164e6abcaebf1
Time: 2018-06-15
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: __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: load_checkpoint