509453992838a524f6442d4e0f07a034390ae1f7,layers/eight_mile/pytorch/layers.py,ConvEncoderStack,__init__,#ConvEncoderStack#Any#Any#Any#Any#Any#Any#,283

Before Change



        first_layer = ConvEncoder(insz, outsz, filtsz, pdrop, activation)
        subsequent_layer = ResidualBlock(ConvEncoder(outsz, outsz, filtsz, pdrop, activation))
        self.layers = nn.ModuleList([first_layer] + [copy.deepcopy(subsequent_layer) for _ in range(layers - 1)])
        self.output_dim = outsz

    def forward(self, input_bct: torch.Tensor) -> torch.Tensor:

After Change


        self.output_dim = outsz

        conv = Conv1DSame(insz, outsz, filtsz)
        act = get_activation(activation)
        dropout = nn.Dropout(pdrop)

        if hidden_last:
            self.conv = nn.Sequential(BTH2BHT(), conv, act, dropout, BHT2BTH())
        else:
            self.conv = nn.Sequential(conv, act, dropout)

    def forward(self, input: torch.Tensor) -> torch.Tensor:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dpressel/mead-baseline
Commit Name: 509453992838a524f6442d4e0f07a034390ae1f7
Time: 2020-02-13
Author: dpressel@gmail.com
File Name: layers/eight_mile/pytorch/layers.py
Class Name: ConvEncoderStack
Method Name: __init__


Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/layers.py
Class Name: PositionalEmbedding
Method Name: __init__


Project Name: dpressel/mead-baseline
Commit Name: cb112c4dfca92159520bb7b2c8a95a94ab38239c
Time: 2019-10-17
Author: dpressel@gmail.com
File Name: python/eight_mile/tf/layers.py
Class Name: DenseStack
Method Name: __init__