ff62eb251b04b8301e71aee970bdb157f2649fa9,keras/layers/core.py,TimeDistributedDense,build,#TimeDistributedDense#Any#,1176

Before Change


        self.W = self.init((input_dim, self.output_dim),
                           name="{}_W".format(self.name))
        if self.bias:
            self.b = K.zeros((self.output_dim,),
                             name="{}_b".format(self.name))
            self.trainable_weights = [self.W, self.b]
        self.regularizers = []

        if self.W_regularizer:
            self.W_regularizer.set_param(self.W)
            self.regularizers.append(self.W_regularizer)

        if self.bias and self.b_regularizer:
            self.b_regularizer.set_param(self.b)
            self.regularizers.append(self.b_regularizer)

        if self.activity_regularizer:
            self.activity_regularizer.set_layer(self)
            self.regularizers.append(self.activity_regularizer)

        self.constraints = {}
        if self.W_constraint:
            self.constraints[self.W] = self.W_constraint
        if self.bias and self.b_constraint:
            self.constraints[self.b] = self.b_constraint

        if self.initial_weights is not None:
            self.set_weights(self.initial_weights)
            del self.initial_weights
        self.built = True

After Change


        input_dim = input_shape[2]

        self.W = self.add_weight((input_dim, self.output_dim),
                                 initializer=self.init,
                                 name="{}_W".format(self.name),
                                 regularizer=self.W_regularizer,
                                 constraint=self.W_constraint)
        if self.bias:
            self.b = self.add_weight((self.output_dim,),
                                     initializer="zero",
                                     name="{}_b".format(self.name),
                                     regularizer=self.b_regularizer,
                                     constraint=self.b_constraint)
        else:
            self.b = None

        if self.initial_weights is not None:
            self.set_weights(self.initial_weights)
            del self.initial_weights
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 80

Instances


Project Name: keras-team/keras
Commit Name: ff62eb251b04b8301e71aee970bdb157f2649fa9
Time: 2016-12-14
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: TimeDistributedDense
Method Name: build


Project Name: keras-team/keras
Commit Name: ff62eb251b04b8301e71aee970bdb157f2649fa9
Time: 2016-12-14
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Convolution3D
Method Name: build


Project Name: keras-team/keras
Commit Name: ff62eb251b04b8301e71aee970bdb157f2649fa9
Time: 2016-12-14
Author: francois.chollet@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Convolution1D
Method Name: build


Project Name: keras-team/keras
Commit Name: ff62eb251b04b8301e71aee970bdb157f2649fa9
Time: 2016-12-14
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: TimeDistributedDense
Method Name: build