6b8cb7dbc7e3d4a40949d858f6765cc7c7bdb7c9,fairseq/modules/multihead_attention.py,MultiheadAttention,reset_parameters,#MultiheadAttention#,53
Before Change
self.onnx_trace = True
def reset_parameters(self):
nn.init.xavier_uniform_(self.in_proj_weight)
nn.init.xavier_uniform_(self.out_proj.weight)
if self.in_proj_bias is not None:
nn.init.constant_(self.in_proj_bias, 0.)
nn.init.constant_(self.out_proj.bias, 0.)
After Change
self.onnx_trace = True
def reset_parameters(self):
if self.qkv_same_dim:
nn.init.xavier_uniform_(self.in_proj_weight)
else:
nn.init.xavier_uniform_(self.k_proj_weight)
nn.init.xavier_uniform_(self.v_proj_weight)
nn.init.xavier_uniform_(self.q_proj_weight)
nn.init.xavier_uniform_(self.out_proj.weight)
if self.in_proj_bias is not None:
nn.init.constant_(self.in_proj_bias, 0.)
nn.init.constant_(self.out_proj.bias, 0.)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: elbayadm/attn2d
Commit Name: 6b8cb7dbc7e3d4a40949d858f6765cc7c7bdb7c9
Time: 2019-04-30
Author: myleott@fb.com
File Name: fairseq/modules/multihead_attention.py
Class Name: MultiheadAttention
Method Name: reset_parameters
Project Name: dmlc/dgl
Commit Name: 3efb5d8ecf7d748655e2199d120a40888ece2282
Time: 2020-03-27
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/nn/pytorch/conv/graphconv.py
Class Name: GraphConv
Method Name: reset_parameters
Project Name: mittagessen/kraken
Commit Name: 1e39951b371238b26783b31dd5101eb334c23412
Time: 2020-07-27
Author: mittagessen@l.unchti.me
File Name: kraken/lib/layers.py
Class Name: ActConv2D
Method Name: resize