1cda66554188c4504aa94d1bcffd4cef9ee8a997,autokeras/utils.py,,copy_layer,#Any#,60

Before Change



def copy_layer(layer):
    new_layer = layer.__class__.from_config(layer.get_config())
    if new_layer is None:
        raise ValueError("There must be a Dense or Convolution Layer")
    return new_layer


def extract_config(network):

After Change


def copy_layer(layer):
    print(layer.get_config)
    new_layer = layer.__class__.from_config(layer.get_config())
    new_layer.build(layer.input_shape)
    new_layer.set_weights(layer.get_weights())
    return new_layer

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: keras-team/autokeras
Commit Name: 1cda66554188c4504aa94d1bcffd4cef9ee8a997
Time: 2017-12-28
Author: jhfjhfj1@gmail.com
File Name: autokeras/utils.py
Class Name:
Method Name: copy_layer


Project Name: keras-team/keras
Commit Name: 44d558ad7f13251650f40475eef6652df59e4b09
Time: 2016-02-22
Author: Nicholas.Eggert@target.com
File Name: keras/layers/containers.py
Class Name: Graph
Method Name: set_previous


Project Name: rlworkgroup/garage
Commit Name: 783e415c29c4a4124ea426c824864a32b0f8ee71
Time: 2019-09-05
Author: hegde.nishanth@gmail.com
File Name: src/garage/tf/policies/gaussian_mlp_policy.py
Class Name: GaussianMLPPolicy
Method Name: dist_info_sym