7278db105dc3ae1d4c1e38b497e54c863a7836e3,keras/layers/recurrent.py,SimpleRNN,get_output,#SimpleRNN#Any#,51

Before Change


        mask = T.addbroadcast(mask[:, :, np.newaxis], 2)

        mask_tm1 = alloc_zeros_matrix(*mask.shape).astype("int8")
        mask_tm1 = T.addbroadcast(T.set_subtensor(mask_tm1[1:, :, :], mask[:-1, :, :]), 2)

        x = T.dot(X, self.W) + self.b
        
        // scan = theano symbolic loop.

After Change


        // Iterate over the first dimension of the x array (=time).
        outputs, updates = theano.scan(
            self._step, // this will be called with arguments (sequences[i], outputs[i-1], non_sequences[i])
            sequences=[x, dict(input=mask,taps=[0, -1])], // tensors to iterate over, inputs to _step
            // initialization of the output. Input to _step with default tap=-1.
            outputs_info=T.unbroadcast(alloc_zeros_matrix(X.shape[1], self.output_dim), 1),
            non_sequences=self.U, // static inputs to _step
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 7278db105dc3ae1d4c1e38b497e54c863a7836e3
Time: 2015-06-19
Author: xavier@whirlscape.com
File Name: keras/layers/recurrent.py
Class Name: SimpleRNN
Method Name: get_output


Project Name: keras-team/keras
Commit Name: a744b600e94ae00fbec71ef493afdff48bc3816b
Time: 2015-11-18
Author: francois.chollet@gmail.com
File Name: keras/layers/normalization.py
Class Name: LRN2D
Method Name: get_output


Project Name: keras-team/keras
Commit Name: 62392a4b5e92ad5a6aefbc2d1379c7423437ff07
Time: 2015-06-25
Author: xavier@whirlscape.com
File Name: keras/layers/embeddings.py
Class Name: Embedding
Method Name: __init__