c00cdeac2672e2d1ef63c02f36bb43e0b5ebfb77,autokeras/layer_transformer.py,,conv_to_deeper_layer,#Any#,10

Before Change


    filter_shape = conv_layer.kernel_size
    n_filters = conv_layer.filters
    weight = np.zeros(filter_shape + (n_filters, n_filters))
    center = (int((filter_shape[0] - 1) / 2), int((filter_shape[1] - 1) / 2))
    for i in range(n_filters):
        filter_weight = np.zeros(filter_shape + (n_filters,))
        filter_weight[center[0], center[1], i] = 1
        weight[:, :, :, i] = filter_weight

After Change


    center = tuple(map(lambda x: int((x - 1) / 2), filter_shape))
    for i in range(n_filters):
        filter_weight = np.zeros(filter_shape + (n_filters,))
        index = center + (i,)
        filter_weight[index] = 1
        weight[..., i] = filter_weight
    bias = np.zeros(n_filters)
    conv_func = get_conv_layer_func(len(filter_shape))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: keras-team/autokeras
Commit Name: c00cdeac2672e2d1ef63c02f36bb43e0b5ebfb77
Time: 2017-12-21
Author: jhfjhfj1@gmail.com
File Name: autokeras/layer_transformer.py
Class Name:
Method Name: conv_to_deeper_layer


Project Name: evilsocket/pwnagotchi
Commit Name: 79ba5102d7b39456593830508e7645f10424c77e
Time: 2019-10-12
Author: evilsocket@gmail.com
File Name: pwnagotchi/ui/view.py
Class Name:
Method Name: setup_display_specifics


Project Name: dmlc/gluon-cv
Commit Name: 47c6377324b4906ed5e133011350c22d1f809466
Time: 2020-05-01
Author: cheungchih@gmail.com
File Name: scripts/gan/srgan/train_srgan.py
Class Name: SubpixelBlock
Method Name: hybrid_forward