408de9b67f56636b9802adae82c06f70f60ae000,keras/layers/core.py,Reshape,call,#Reshape#Any#,378

Before Change


        // we need access to the shape of `inputs`.
        // solution: rely on `K.int_shape`.
        target_shape = self.target_shape
        if -1 in target_shape:
            // Target shape not fully defined.
            input_shape = None
            try:
                input_shape = K.int_shape(inputs)
            except TypeError:
                pass
            if input_shape is not None:
                target_shape = self.compute_output_shape(input_shape)[1:]
        return K.reshape(inputs, (-1,) + target_shape)

    def get_config(self):
        config = {"target_shape": self.target_shape}

After Change


                input_shape[1:], self.target_shape)

    def call(self, inputs):
        return K.reshape(inputs, (K.shape(inputs)[0],) + self.target_shape)

    def get_config(self):
        config = {"target_shape": self.target_shape}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: keras-team/keras
Commit Name: 408de9b67f56636b9802adae82c06f70f60ae000
Time: 2017-09-26
Author: hansg91@gmail.com
File Name: keras/layers/core.py
Class Name: Reshape
Method Name: call


Project Name: keras-team/keras
Commit Name: f93ca5174a1a31c362de0d5a5330f99c77a6ad42
Time: 2020-12-17
Author: scottzhu@google.com
File Name: keras/engine/training.py
Class Name: Model
Method Name: load_weights


Project Name: streamlit/streamlit
Commit Name: a410b46917e3c34e74f67e6262cfa42e8fc7849c
Time: 2019-02-27
Author: tconkling@gmail.com
File Name: lib/streamlit/image_proto.py
Class Name:
Method Name: marshall_images