57612707c1434ed3b18f9cad5cf2e6dd8b7b3b7d,keras/layers/core.py,Merge,__init__,#Merge#Any#Any#Any#Any#,279

Before Change


                    if shape1[dot_axes[0][i]] != shape2[dot_axes[1][i]]:
                        raise Exception(" Dot incompatible layers can not be merged using dot mode")
        elif mode == "concat":
            input_shapes = set([list(l.output_shape).pop(concat_axis) for l in layers])
            if len(input_shapes) > 1:
                raise Exception(""concat" mode can only merge layers with matching output shapes except for the concat axis")

        self.mode = mode

After Change


        elif mode == "concat":
            input_shapes = set()
            for l in layers:
                oshape = list(l.output_shape)
                oshape.pop(concat_axis)
                oshape = tuple(oshape)
                input_shapes.add(oshape)
            if len(input_shapes) > 1:
                raise Exception(""concat" mode can only merge layers with matching output shapes except for the concat axis")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 57612707c1434ed3b18f9cad5cf2e6dd8b7b3b7d
Time: 2015-11-02
Author: roller@cs.utexas.edu
File Name: keras/layers/core.py
Class Name: Merge
Method Name: __init__


Project Name: uber/ludwig
Commit Name: e3d1e6dfd06c35dec767c53b930fa69fc2ff7b12
Time: 2020-04-14
Author: w4nderlust@gmail.com
File Name: ludwig/utils/visualization_utils.py
Class Name:
Method Name: hyperopt_pair_plot


Project Name: NifTK/NiftyNet
Commit Name: 60ac44f9e688577d47ae506be06058a8916af100
Time: 2018-05-08
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_window.py
Class Name: ImageWindow
Method Name: _update_placeholders_dict