825d58e2bbbe234019898e414fb9129af1f17014,keras/initializers.py,Orthogonal,__call__,#Orthogonal#Any#Any#,231

Before Change


        self.seed = seed

    def __call__(self, shape, dtype=None):
        flat_shape = (shape[0], np.prod(shape[1:]))
        if self.seed is not None:
            np.random.seed(self.seed)
        a = np.random.normal(0.0, 1.0, flat_shape)

After Change


        for dim in shape[:-1]:
            num_rows *= dim
        num_cols = shape[-1]
        flat_shape = (num_rows, num_cols)
        if self.seed is not None:
            np.random.seed(self.seed)
        a = np.random.normal(0.0, 1.0, flat_shape)
        u, _, v = np.linalg.svd(a, full_matrices=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 825d58e2bbbe234019898e414fb9129af1f17014
Time: 2017-02-24
Author: francois.chollet@gmail.com
File Name: keras/initializers.py
Class Name: Orthogonal
Method Name: __call__


Project Name: keras-team/keras
Commit Name: 52bcd448f46a571bd66855531c47881c21d774fc
Time: 2015-04-17
Author: francois.chollet@gmail.com
File Name: keras/initializations.py
Class Name:
Method Name: glorot_normal


Project Name: keras-team/keras
Commit Name: 52bcd448f46a571bd66855531c47881c21d774fc
Time: 2015-04-17
Author: francois.chollet@gmail.com
File Name: keras/initializations.py
Class Name:
Method Name: he_normal