b80fb3bdcfeac64d91b7365be1196392e013dcb8,autokeras/utils.py,,extract_config,#Any#,95

Before Change


def extract_config(network):
    Return configuration of one model
    config = {"type": [], "config": []}
    for layer in network.layers:
        name = type(layer).__name__
        config["type"].append(name)
        layer_config = layer.get_config()
        important_attr = {}
        for attr in LAYER_ATTR[name]:
            important_attr[attr] = layer_config[attr]
        config["config"].append(important_attr)
    return config


def ensure_dir(directory):

After Change



def extract_config(network):
    Return configuration of one model
    return network.get_config()


def ensure_dir(directory):
    Create directory if it does not exist
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: keras-team/autokeras
Commit Name: b80fb3bdcfeac64d91b7365be1196392e013dcb8
Time: 2018-01-05
Author: jhfjhfj1@gmail.com
File Name: autokeras/utils.py
Class Name:
Method Name: extract_config


Project Name: studioml/studio
Commit Name: a267aa92b6e25a39a5da310502d5ccef29737327
Time: 2017-10-13
Author: peter.zhokhov@sentient.ai
File Name: studio/magics.py
Class Name: StudioMagics
Method Name: studio_run