ee9cadefd8d3b96469f97453db73a117fee5a009,mmf/models/vilbert.py,BertSelfAttention,forward,#BertSelfAttention#Any#Any#,59

Before Change


        attention_scores = attention_scores + attention_mask

        // Normalize the attention scores to probabilities.
        attention_probs = nn.Softmax(dim=-1)(attention_scores)

        // This is actually dropping out entire tokens to attend to, which might
        // seem a bit unusual, but is taken from the original Transformer paper.
        attention_probs = self.dropout(attention_probs)

After Change


        attention_scores = attention_scores + attention_mask

        // Normalize the attention scores to probabilities.
        attention_probs = nn.functional.softmax(attention_scores, dim=-1)

        // This is actually dropping out entire tokens to attend to, which might
        // seem a bit unusual, but is taken from the original Transformer paper.
        attention_probs = self.dropout(attention_probs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: facebookresearch/pythia
Commit Name: ee9cadefd8d3b96469f97453db73a117fee5a009
Time: 2020-10-14
Author: mengq@fb.com
File Name: mmf/models/vilbert.py
Class Name: BertSelfAttention
Method Name: forward


Project Name: facebookresearch/pythia
Commit Name: ee9cadefd8d3b96469f97453db73a117fee5a009
Time: 2020-10-14
Author: mengq@fb.com
File Name: mmf/models/vilbert.py
Class Name: BertBiAttention
Method Name: forward


Project Name: facebookresearch/pythia
Commit Name: ee9cadefd8d3b96469f97453db73a117fee5a009
Time: 2020-10-14
Author: mengq@fb.com
File Name: mmf/models/vilbert.py
Class Name: BertImageSelfAttention
Method Name: forward