c4610ff26a01a0622bc11dcac0f0812f05c56e0c,12_4_name_classify.py,RNNClassifier,forward,#RNNClassifier#,97

Before Change



        output, hidden = self.gru(gru_input, hidden)
        fc_output = self.fc(hidden[-1])  // Use the last layer
        print("Final output size", fc_output.size())
        return fc_output

    def _init_hidden(self, batch_size):
        hidden = torch.zeros(self.n_layers, batch_size, self.hidden_size)

After Change


        // input shape: B x S (input size)
        // transpose to make S(sequence) x B (batch)
        input = input.t()
        batch_size = input.size(1)

        // Make a hidden
        hidden = self._init_hidden(batch_size)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: hunkim/PyTorchZeroToAll
Commit Name: c4610ff26a01a0622bc11dcac0f0812f05c56e0c
Time: 2017-11-02
Author: hunkim@gmail.com
File Name: 12_4_name_classify.py
Class Name: RNNClassifier
Method Name: forward


Project Name: mseitzer/pytorch-fid
Commit Name: 40f37ca5bdaa158f635e6c63c8781f7211675e98
Time: 2019-03-11
Author: elvisyjlin@gmail.com
File Name: fid_score.py
Class Name:
Method Name: get_activations


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 3c1549620cb4801c12a3d38f91ef03e44f3d5a52
Time: 2018-04-24
Author: eriklindernoren@gmail.com
File Name: implementations/bicyclegan/models.py
Class Name: Encoder
Method Name: forward