0ac2b33e8c63304a50db7d2b484368299706b58b,slm_lab/agent/net/recurrent.py,RecurrentNet,forward,#RecurrentNet#Any#,144

Before Change


        // Restack to batch_size x seq_len x rnn_input_dim
        x = x.view(-1, self.seq_len, self.rnn_input_dim)
        hid_0 = self.init_hidden(batch_size)
        _, final_hid = self.rnn_model(x, hid_0)
        final_hid.squeeze_(dim=0)
        // return tensor if single tail, else list of tail tensors
        if len(self.model_tails) == 1:

After Change


            _output, (h_n, c_n) = self.rnn_model(x)
        else:
            _output, h_n = self.rnn_model(x)
        hid_x = h_n[-1:].squeeze_(dim=0)  // get final time-layer
        // return tensor if single tail, else list of tail tensors
        if hasattr(self, "model_tails"):
            outs = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: kengz/SLM-Lab
Commit Name: 0ac2b33e8c63304a50db7d2b484368299706b58b
Time: 2018-11-14
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/recurrent.py
Class Name: RecurrentNet
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: 26ce348437037a351f6f646207e1c20f3853c8b7
Time: 2018-01-10
Author: gpleiss@gmail.com
File Name: test/util/test_cubic_interpolation.py
Class Name:
Method Name: test_interpolation


Project Name: facebookresearch/ParlAI
Commit Name: fa2729f3b972a790d86c6ec6a767ed4dacbbc2a5
Time: 2018-10-18
Author: ahm@fb.com
File Name: parlai/agents/memnn/memnn.py
Class Name: MemnnAgent
Method Name: _build_train_cands