51b3425030ec72600cdfef89c9cef9148a810937,transformer/Models.py,Encoder,forward,#Encoder#,65
Before Change
// -- Forward
enc_output = self.dropout(self.position_enc(self.src_word_emb(src_seq)))
enc_output = self.layer_norm(enc_output)
for enc_layer in self.layer_stack:
enc_output, enc_slf_attn = enc_layer(enc_output, slf_attn_mask=src_mask)
After Change
// -- Forward
enc_output = self.src_word_emb(src_seq)
if self.scale_emb:
enc_output *= self.d_model ** 0.5
enc_output = self.dropout(self.position_enc(enc_output))
enc_output = self.layer_norm(enc_output)
for enc_layer in self.layer_stack:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 51b3425030ec72600cdfef89c9cef9148a810937
Time: 2021-01-11
Author: houjing.huang@nlpr.ia.ac.cn
File Name: transformer/Models.py
Class Name: Encoder
Method Name: forward
Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 51b3425030ec72600cdfef89c9cef9148a810937
Time: 2021-01-11
Author: houjing.huang@nlpr.ia.ac.cn
File Name: transformer/Models.py
Class Name: Decoder
Method Name: forward
Project Name: mariogeiger/se3cnn
Commit Name: f3e7b16ce89d4e737e7608996df2bd241d594a58
Time: 2019-07-09
Author: geiger.mario@gmail.com
File Name: se3cnn/blocks/gated_block.py
Class Name: GatedBlock
Method Name: forward