1a010ccffb1c80997260b9fe7cf3b7a3887b13ae,autokeras/net_combinator.py,,pad_filter,#Any#Any#Any#,36

Before Change




def pad_filter(weight, old_size, new_size):
    return np.pad(weight,
                  map(lambda x: (x, x), tuple(np.subtract(np.array(new_size), np.array(old_size)) / 2)),
                  "constant",
                  constant_values=0)


def combine_conv_weights(layer1, layer2, filter_size, n_input_channel):
    weight1, bias1 = layer1.get_weights()

After Change



def pad_filter(weight, old_size, new_size):
    pad_width = tuple(map(lambda x: (int(x), int(x)), np.subtract(np.array(new_size), np.array(old_size)) / 2))
    pad_width += ((0, 0), (0, 0))
    return np.pad(weight,
                  pad_width,
                  "constant",
                  constant_values=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: keras-team/autokeras
Commit Name: 1a010ccffb1c80997260b9fe7cf3b7a3887b13ae
Time: 2017-12-19
Author: jhfjhfj1@gmail.com
File Name: autokeras/net_combinator.py
Class Name:
Method Name: pad_filter


Project Name: maciejkula/spotlight
Commit Name: 396303a7b84fe4f8b304a5878c487ff0b3a16097
Time: 2017-07-08
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: CNNNet
Method Name: user_representation


Project Name: deepchem/deepchem
Commit Name: 38311a7d314056a807b6c23c1c45b0618497dc00
Time: 2020-09-12
Author: nd.12021218@gmail.com
File Name: deepchem/feat/molecule_featurizers/bp_symmetry_function_input.py
Class Name: BPSymmetryFunctionInput
Method Name: _featurize