a214f4e64d9e1f09a6ffdcad5e9595d0534e08f0,keras/layers/recurrent.py,SimpleRNN,build,#SimpleRNN#Any#,356

Before Change



    def build(self, input_shape):
        // TODO: handle variable-length seqs in input_spec
        self.input_spec = InputSpec(shape=input_shape)
        if self.stateful:
            self.reset_states()
        else:
            // Initial states: all-zero tensor of shape (output_dim).
            self.states = [None]
        input_dim = input_shape[2]
        self.input_dim = input_dim

        self.kernel = self.add_weight((input_dim, self.units),
                                      name="kernel",
                                      initializer=self.kernel_initializer,
                                      regularizer=self.kernel_regularizer,

After Change


        self.recurrent_dropout = min(1., max(0., recurrent_dropout))

    def build(self, input_shape):
        if isinstance(input_shape, list):
            input_shape = input_shape[0]
        if self.stateful:
            self.reset_states()
        else:
            // Initial states: all-zero tensor of shape (output_dim).
            self.states = [None]
        input_dim = input_shape[2]
        self.input_dim = input_dim

        self.kernel = self.add_weight((input_dim, self.units),
                                      name="kernel",
                                      initializer=self.kernel_initializer,
                                      regularizer=self.kernel_regularizer,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: keras-team/keras
Commit Name: a214f4e64d9e1f09a6ffdcad5e9595d0534e08f0
Time: 2017-03-03
Author: joshuarchin@gmail.com
File Name: keras/layers/recurrent.py
Class Name: SimpleRNN
Method Name: build


Project Name: keras-team/keras
Commit Name: a214f4e64d9e1f09a6ffdcad5e9595d0534e08f0
Time: 2017-03-03
Author: joshuarchin@gmail.com
File Name: keras/layers/recurrent.py
Class Name: LSTM
Method Name: build


Project Name: keras-team/keras
Commit Name: a214f4e64d9e1f09a6ffdcad5e9595d0534e08f0
Time: 2017-03-03
Author: joshuarchin@gmail.com
File Name: keras/layers/recurrent.py
Class Name: SimpleRNN
Method Name: build


Project Name: keras-team/keras
Commit Name: a214f4e64d9e1f09a6ffdcad5e9595d0534e08f0
Time: 2017-03-03
Author: joshuarchin@gmail.com
File Name: keras/layers/recurrent.py
Class Name: GRU
Method Name: build