e12e1d254c77b363d3876893cc4943277dcc5f1f,fairseq/models/fconv.py,FConvEncoder,__init__,#FConvEncoder#Any#Any#Any#Any#Any#Any#Any#,186

Before Change


                residual_dim = layer_in_channels[-residual]
            self.projections.append(Linear(residual_dim, out_channels)
                                    if residual_dim != out_channels else None)
            if kernel_size % 2 == 1:
                padding = kernel_size // 2
            else:
                padding = 0
            self.convolutions.append(
                ConvTBC(in_channels, out_channels * 2, kernel_size,
                        dropout=dropout, padding=padding)
            )

After Change


    Args:
        dictionary (~fairseq.data.Dictionary): encoding dictionary
        embed_dim (int, optional): embedding dimension
        embed_dict (str, optional): filename from which to load pre-trained
            embeddings
        max_positions (int, optional): maximum supported input sequence length
        convolutions (list, optional): the convolutional layer structure. Each
            list item `i` corresponds to convolutional layer `i`. Layers are
            given as ``(out_channels, kernel_width, [residual])``. Residual
            connections are added between layers when ``residual=1`` (which is
            the default behavior).
        dropout (float, optional): dropout to be applied before each conv layer
    

    def __init__(
        self, dictionary, embed_dim=512, embed_dict=None, max_positions=1024,
        convolutions=((512, 3),) * 20, dropout=0.1,
    ):
        super().__init__(dictionary)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: pytorch/fairseq
Commit Name: e12e1d254c77b363d3876893cc4943277dcc5f1f
Time: 2019-04-15
Author: myleott@fb.com
File Name: fairseq/models/fconv.py
Class Name: FConvEncoder
Method Name: __init__


Project Name: rusty1s/pytorch_geometric
Commit Name: 2824bccbb4817467cf63283f5366f4134949d0b4
Time: 2019-06-10
Author: ekagra.ranjan@gmail.com
File Name: benchmark/kernel/gin.py
Class Name: GIN0WithJK
Method Name: __init__


Project Name: elbayadm/attn2d
Commit Name: e12e1d254c77b363d3876893cc4943277dcc5f1f
Time: 2019-04-15
Author: myleott@fb.com
File Name: fairseq/models/fconv.py
Class Name: FConvEncoder
Method Name: __init__