33b341d1f8c6397b547f12ae2d5937bf5e2fd1ec,transformer/SubLayers.py,PositionwiseFeedForward,forward,#PositionwiseFeedForward#Any#,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
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 4
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: kuangliu/pytorch-cifar
Commit Name: 41e053e2061615c65395447ab947ebf938bcb53b
Time: 2017-04-17
Author: kuang.liu@hotmail.com
File Name: models/lenet.py
Class Name: LeNet
Method Name: forward
Project Name: tensorflow/minigo
Commit Name: 57a0da27f6c4021ebb8805795781103576e264b6
Time: 2018-06-21
Author: sethtroisi@google.com
File Name: dual_net.py
Class Name:
Method Name: model_inference_fn
Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 2cd4ca6dc541b568f4d508542fa2cc79a58e5e68
Time: 2020-06-03
Author: bodo.rueckauer@gmail.com
File Name: snntoolbox/simulation/backends/inisim/temporal_pattern.py
Class Name: SpikeLayer
Method Name: spike_call
Project Name: tensorflow/cleverhans
Commit Name: 060c1d4ca2d70b441447498213a09a0adc68404b
Time: 2019-01-31
Author: ss.shankar505@gmail.com
File Name: cleverhans/experimental/certification/dual_formulation.py
Class Name: DualFormulation
Method Name: __init__
Project Name: calico/basenji
Commit Name: 2c19508945b48619e531e1d27edc4882dfa6c996
Time: 2016-07-17
Author: davidkelley44@gmail.com
File Name: basenji/autoencoder.py
Class Name: AE
Method Name: __init__