6ad8c8b4c73379c9366d387fb881c3f790f615b0,python/baseline/tf/layers.py,TransformerEncoder,call,#TransformerEncoder#Any#Any#Any#,596
Before Change
x = self.multi_head_attention((x, x, x), training, mask)
x = x + self.dropout(x, training)
x = self.ln2(x)
x = self.ffn(x, training, mask)
x = x + self.dropout(x, training)
return x
class FFN(tf.keras.Model):
After Change
x = inputs
x = self.ln1(x)
x = x + self.dropout(self.self_attn((x, x, x), training, mask), training)
x = self.ln2(x)
x = x + self.dropout(self.feed_forward(x, training, mask), training)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: dpressel/mead-baseline
Commit Name: 6ad8c8b4c73379c9366d387fb881c3f790f615b0
Time: 2019-09-25
Author: dpressel@gmail.com
File Name: python/baseline/tf/layers.py
Class Name: TransformerEncoder
Method Name: call
Project Name: stanfordnlp/stanza
Commit Name: fcea9fee573e854177b4b9af1cfd1b20029ed21e
Time: 2018-10-11
Author: qipeng@users.noreply.github.com
File Name: models/common/char_model.py
Class Name: CharacterModel
Method Name: forward
Project Name: facebookresearch/ParlAI
Commit Name: 45377d56ec3d5e8c1cfa2a1f8ecae9adf61ca208
Time: 2019-12-27
Author: EricMichaelSmith@users.noreply.github.com
File Name: parlai/agents/transformer/modules.py
Class Name: TransformerEncoderLayer
Method Name: forward