504d63d25cfd42e650834d8db6d976103e5f4baa,autokeras/net_transformer.py,,transform,#Any#,88

Before Change


    for i in range(Constant.N_NEIGHBOURS):
        a = randrange(3)
        if a == 0:
            graphs.append(to_deeper_graph(deepcopy(graph)))
        elif a == 1:
            graphs.append(to_wider_graph(deepcopy(graph)))
        elif a == 2:
            graphs.append(to_skip_connection_graph(deepcopy(graph)))
    graphs = list(filter(lambda x: x, graphs))
    return list(filter(lambda x: legal_graph(x), graphs))


def default_transform(graph):

After Change




def transform(graph):
    graphs = []
    for i in range(Constant.N_NEIGHBOURS * 2):
        a = randrange(3)
        temp_graph = None
        if a == 0:
            temp_graph = to_deeper_graph(deepcopy(graph))
        elif a == 1:
            temp_graph = to_wider_graph(deepcopy(graph))
        elif a == 2:
            temp_graph = to_skip_connection_graph(deepcopy(graph))

        if temp_graph is not None and temp_graph.size() <= Constant.MAX_MODEL_SIZE:
            graphs.append(temp_graph)

        if len(graphs) >= Constant.N_NEIGHBOURS:
            break

    return list(filter(lambda x: legal_graph(x), graphs))


def default_transform(graph):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 29

Instances


Project Name: keras-team/autokeras
Commit Name: 504d63d25cfd42e650834d8db6d976103e5f4baa
Time: 2018-09-03
Author: jhfjhfj1@gmail.com
File Name: autokeras/net_transformer.py
Class Name:
Method Name: transform


Project Name: jhfjhfj1/autokeras
Commit Name: 68e0442cd7c9e28e2d1a0ca41dac64297fad858a
Time: 2018-08-30
Author: jhfjhfj1@gmail.com
File Name: autokeras/net_transformer.py
Class Name:
Method Name: transform


Project Name: jhfjhfj1/autokeras
Commit Name: 504d63d25cfd42e650834d8db6d976103e5f4baa
Time: 2018-09-03
Author: jhfjhfj1@gmail.com
File Name: autokeras/net_transformer.py
Class Name:
Method Name: transform