3f9700868da4d09988b7dfbd7d5b3a9d5ea7d401,fairseq/multiprocessing_trainer.py,MultiprocessingTrainer,train_step,#MultiprocessingTrainer#Any#,127
Before Change
]
// aggregate losses and gradient norms
loss_dicts = Future.gen_list(losses)
loss_dict = self.criterion.aggregate(loss_dicts)
loss_dict["gnorm"] = loss_dicts[0]["gnorm"]
return loss_dict
After Change
self._scatter_samples(samples, replace_empty_samples=replace_empty_samples)
// forward pass
sample_sizes, logging_outputs = Future.gen_tuple_list([
self.call_async(rank, "_async_forward")
for rank in range(self.num_replicas)
])
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: elbayadm/attn2d
Commit Name: 3f9700868da4d09988b7dfbd7d5b3a9d5ea7d401
Time: 2017-10-19
Author: myleott@fb.com
File Name: fairseq/multiprocessing_trainer.py
Class Name: MultiprocessingTrainer
Method Name: train_step
Project Name: elbayadm/attn2d
Commit Name: 3f9700868da4d09988b7dfbd7d5b3a9d5ea7d401
Time: 2017-10-19
Author: myleott@fb.com
File Name: fairseq/multiprocessing_trainer.py
Class Name: MultiprocessingTrainer
Method Name: valid_step