9400be98783135a1d42dd238f4e6c3aa048eceea,keras/layers/embeddings.py,Embedding,compute_output_shape,#Embedding#,115

Before Change


            else:
                for i, (s1, s2) in enumerate(zip(in_lens, input_shape[1:])):
                    if s1 is not None and s2 is not None and s1 != s2:
                        ValueError(""input_length" is %s, but received input has shape %s" %
                                   (str(self.input_length), str(input_shape)))
                    elif s1 is None:
                        in_lens[i] = s2
            return (input_shape[0],) + tuple(in_lens) + (self.output_dim,)

After Change


            else:
                for i, (s1, s2) in enumerate(zip(in_lens, input_shape[1:])):
                    if s1 is not None and s2 is not None and s1 != s2:
                        raise ValueError(""input_length" is %s, but received input has shape %s" %
                                         (str(self.input_length), str(input_shape)))
                    elif s1 is None:
                        in_lens[i] = s2
            return (input_shape[0],) + tuple(in_lens) + (self.output_dim,)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

Instances


Project Name: keras-team/keras
Commit Name: 9400be98783135a1d42dd238f4e6c3aa048eceea
Time: 2018-09-06
Author: ybliang8@gmail.com
File Name: keras/layers/embeddings.py
Class Name: Embedding
Method Name: compute_output_shape


Project Name: tflearn/tflearn
Commit Name: 9ae7a319feaa9c2561852eb3f4900e631909e161
Time: 2017-02-10
Author: wyj2046@gmail.com
File Name: tflearn/layers/estimator.py
Class Name:
Method Name: regression


Project Name: GPflow/GPflow
Commit Name: 4a05c9593716d8321922be0a08576c6946da4e71
Time: 2017-11-05
Author: art.art.v@gmail.com
File Name: gpflow/params/parameter.py
Class Name: Parameter
Method Name: _init_parameter_value


Project Name: chainer/chainercv
Commit Name: 4ffb943ed62d68466b9c561b40091325dada0dbe
Time: 2017-05-26
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/visualizations/vis_label.py
Class Name:
Method Name: vis_label