33b341d1f8c6397b547f12ae2d5937bf5e2fd1ec,transformer/SubLayers.py,PositionwiseFeedForward,forward,#PositionwiseFeedForward#,75

Before Change



    def forward(self, x):
        residual = x
        output = F.relu(self.w_1(x.transpose(1, 2)))
        output = self.w_2(output).transpose(2, 1)
        output = self.dropout(output)
        return self.layer_norm(output + residual)

After Change


    def forward(self, x):
        residual = x
        output = x.transpose(1, 2)
        output = self.w_2(F.relu(self.w_1(output)))
        output = output.transpose(1, 2)
        output = self.dropout(output)
        output = self.layer_norm(output + residual)
        return output
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 33b341d1f8c6397b547f12ae2d5937bf5e2fd1ec
Time: 2018-08-22
Author: yhhuang@nlg.csie.ntu.edu.tw
File Name: transformer/SubLayers.py
Class Name: PositionwiseFeedForward
Method Name: forward


Project Name: pytorch/examples
Commit Name: d8dd8caeec861648813ae7b1112b3faf7f85a326
Time: 2018-12-12
Author: 33121121+surgan12@users.noreply.github.com
File Name: mnist/main.py
Class Name: Net
Method Name: forward


Project Name: xinntao/BasicSR
Commit Name: 2b38855e22530bab3e66dda77c4fc653c141c1d1
Time: 2018-06-11
Author: wxt1994@126.com
File Name: codes/models/modules/sft_arch.py
Class Name: ResBlock_SFT
Method Name: forward