08a31864a8e7a633546790d8fed54455b914d96b,python/baseline/pytorch/transformer.py,TransformerDecoder,__init__,#TransformerDecoder#Any#Any#Any#Any#Any#Any#,178
Before Change
self.feed_forward = FFN(d_model, pdrop, d_ff=d_ff, activation_type=activation_type)
self.ln1 = LayerNorm(d_model)
self.ln2 = LayerNorm(d_model)
self.ln3 = LayerNorm(d_model)
self.dropout = nn.Dropout(pdrop)
def forward(self, x, memory, src_mask, tgt_mask):
After Change
def __init__(self, num_heads, d_model, pdrop, scale=True, activation_type="relu", d_ff=None):
super(TransformerDecoder, self).__init__()
self.d_model = d_model
self.d_ff = d_ff if d_ff is not None else 4 * d_model
self.self_attn = MultiHeadedAttention(num_heads, self.d_model, pdrop, scale=scale)
self.src_attn = MultiHeadedAttention(num_heads, self.d_model, pdrop, scale=scale)
self.ffn = nn.Sequential(pytorch_linear(self.d_model, self.d_ff),
pytorch_activation(activation_type),
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: dpressel/mead-baseline
Commit Name: 08a31864a8e7a633546790d8fed54455b914d96b
Time: 2019-06-18
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/transformer.py
Class Name: TransformerDecoder
Method Name: __init__
Project Name: dpressel/mead-baseline
Commit Name: 08a31864a8e7a633546790d8fed54455b914d96b
Time: 2019-06-18
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/transformer.py
Class Name: TransformerEncoder
Method Name: __init__
Project Name: mozilla/TTS
Commit Name: d3b7284be49551db1f1a8726b3974815573f1d7b
Time: 2021-01-06
Author: erogol@hotmail.com
File Name: TTS/tts/layers/glow_tts/glow.py
Class Name: ConvLayerNorm
Method Name: __init__