07ffc76b9318ab1197ce61838992960e9abb3c22,keras/layers/recurrent.py,LSTM,build,#LSTM#,291

Before Change


        self.input = K.placeholder(input_shape)

        if self.stateful:
            if not input_shape[0]:
                raise Exception("If a RNN is stateful, a complete " +
                                "input_shape must be provided " +
                                "(including batch size).")
            self.states = [K.zeros((input_shape[0], self.output_dim)),
                           K.zeros((input_shape[0], self.output_dim))]
        else:
            // initial states: 2 all-zero tensor of shape (output_dim)
            self.states = [None, None]

After Change


        self.inner_activation = activations.get(inner_activation)
        super(LSTM, self).__init__(**kwargs)

    def build(self):
        input_shape = self.input_shape
        input_dim = input_shape[2]
        self.input_dim = input_dim
        self.input = K.placeholder(input_shape)

        if self.stateful:
            self.reset_states()
        else:
            // initial states: 2 all-zero tensor of shape (output_dim)
            self.states = [None, None]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: keras-team/keras
Commit Name: 07ffc76b9318ab1197ce61838992960e9abb3c22
Time: 2015-12-08
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name: LSTM
Method Name: build


Project Name: keras-team/keras
Commit Name: 07ffc76b9318ab1197ce61838992960e9abb3c22
Time: 2015-12-08
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name: LSTM
Method Name: build


Project Name: keras-team/keras
Commit Name: 07ffc76b9318ab1197ce61838992960e9abb3c22
Time: 2015-12-08
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name: SimpleRNN
Method Name: build


Project Name: keras-team/keras
Commit Name: 07ffc76b9318ab1197ce61838992960e9abb3c22
Time: 2015-12-08
Author: francois.chollet@gmail.com
File Name: keras/layers/recurrent.py
Class Name: GRU
Method Name: build