dccf79092eb28fa7b176945b6c01906a261522f2,fairseq/sequence_generator.py,SequenceGenerator,_decode,#SequenceGenerator#Any#Any#,321

Before Change


                avg_attn.add_(attn)
        avg_probs.div_(len(self.models))
        avg_probs.log_()
        avg_attn.div_(len(self.models))

        return avg_probs, avg_attn

After Change


                    avg_attn.add_(attn)
        avg_probs.div_(len(self.models))
        avg_probs.log_()
        if avg_attn is not None:
            avg_attn.div_(len(self.models))

        return avg_probs, avg_attn
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: pytorch/fairseq
Commit Name: dccf79092eb28fa7b176945b6c01906a261522f2
Time: 2018-01-22
Author: myleott@fb.com
File Name: fairseq/sequence_generator.py
Class Name: SequenceGenerator
Method Name: _decode


Project Name: elbayadm/attn2d
Commit Name: 8eb232ce150d1afb44880a7078eb4abbae60dc32
Time: 2018-11-07
Author: myleott@fb.com
File Name: fairseq/sequence_scorer.py
Class Name: SequenceScorer
Method Name: score