e0a649263bdc4b9803c4103f288a0675ebbecd5d,keras_applications/resnet_common.py,,block3,#Any#Any#Any#Any#Any#Any#Any#,194

Before Change


    x = layers.DepthwiseConv2D(kernel_size, strides=stride, depth_multiplier=c,
                               use_bias=False, name=name + "_2_conv")(x)
    x_shape = backend.int_shape(x)[1:-1]
    x = layers.Reshape(x_shape + (groups, c, c))(x)
    output_shape = x_shape + (groups, c) if backend.backend() == "theano" else None
    x = layers.Lambda(lambda x: sum([x[:, :, :, :, i] for i in range(c)]),
                      output_shape=output_shape, name=name + "_2_reduce")(x)
    x = layers.Reshape(x_shape + (filters,))(x)
    x = layers.BatchNormalization(axis=bn_axis, epsilon=1.001e-5,
                                  name=name + "_2_bn")(x)
    x = layers.Activation("relu", name=name + "_2_relu")(x)

After Change


    for i in range(filters):
        start = (i // c) * c * c + i % c
        end = start + c * c
        kernel[:, :, start:end:c, i] = 1.
    x = layers.Conv2D(filters, 1, use_bias=False, trainable=False,
                      kernel_initializer={"class_name": "Constant",
                                          "config": {"value": kernel}},
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: keras-team/keras-applications
Commit Name: e0a649263bdc4b9803c4103f288a0675ebbecd5d
Time: 2019-10-13
Author: me@taehoonlee.com
File Name: keras_applications/resnet_common.py
Class Name:
Method Name: block3


Project Name: keras-team/keras
Commit Name: eb89648ac93c8b8503a1c1059707caad8ec71f78
Time: 2021-01-15
Author: scottzhu@google.com
File Name: keras/applications/resnet.py
Class Name:
Method Name: block3


Project Name: XifengGuo/CapsNet-Keras
Commit Name: 37f599f61067cc6947c9bf783eace05227c0f450
Time: 2017-11-13
Author: guoxifeng1990@163.com
File Name: capsulenet.py
Class Name:
Method Name: CapsNet


Project Name: keras-team/keras
Commit Name: bf4dab3501c62836f94ea17d2f0e198348f5293d
Time: 2016-03-31
Author: francois.chollet@gmail.com
File Name: tests/keras/layers/test_core.py
Class Name:
Method Name: test_reshape