0a687cfb7db7998d9d79d58cd1762041a143a547,models/common/hlstm.py,HighwayLSTM,__init__,#HighwayLSTM#Any#Any#Any#Any#Any#Any#Any#Any#Any#,53

Before Change


        for l in range(num_layers):
            self.lstm.append(PackedLSTM(in_size, hidden_size, num_layers=1, bias=bias,
                batch_first=batch_first, dropout=0, bidirectional=bidirectional, pad=True, rec_dropout=rec_dropout))
            for d in range(self.num_directions):
                self.highway.append(nn.Linear(hw_in_size, hidden_size, bias=bias))
                self.gate.append(nn.Linear(hw_in_size, hidden_size))
            in_size = hidden_size * self.num_directions
            hw_in_size = hidden_size

    def forward(self, input, mask, hx=None):

After Change


            self.highway.append(nn.Linear(in_size, hidden_size * self.num_directions))
            self.gate.append(nn.Linear(in_size, hidden_size * self.num_directions))
            self.highway[-1].bias.data.zero_()
            self.gate[-1].bias.data.zero_()
            in_size = hidden_size * self.num_directions

    def forward(self, input, mask, hx=None):
        highway_func = (lambda x: x) if self.highway_func is None else self.highway_func
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: stanfordnlp/stanza
Commit Name: 0a687cfb7db7998d9d79d58cd1762041a143a547
Time: 2018-09-17
Author: qipeng@users.noreply.github.com
File Name: models/common/hlstm.py
Class Name: HighwayLSTM
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: 9b664bd7cd8dbb9657626166ba61887ed06774d7
Time: 2017-09-13
Author: gpleiss@gmail.com
File Name: gpytorch/utils/toeplitz.py
Class Name:
Method Name: index_coef_to_sparse


Project Name: dmlc/dgl
Commit Name: 9c9ac7c960aff5e4e6524202483c774f407fcf42
Time: 2018-05-09
Author: coin2028@hotmail.com
File Name: model.py
Class Name: TreeGlimpsedClassifier
Method Name: forward