d165905d0ba24cfba414b8e0c20fa8d7c8ab6a6e,nni/retiarii/codegen/pytorch.py,,graph_to_pytorch_model,#Any#Any#Any#,57

Before Change


    return import_pkgs, _PyTorchModelTemplate.format(
        graph_name=("Graph" if graph_name == "_graph" else graph_name),
        inputs=input_code,
        outputs=", ".join(output_names),
        nodes=linebreak.join(node_codes),
        edges=linebreak.join(edge_codes)
    )

After Change


        input_code = "*_inputs"
    else:
        for name in graph.input_node.operation.io_names:
            assert not name.startswith(graph_name)
        input_code = ", ".join(graph.input_node.operation.io_names)

    edge_codes = []
    sorted_nodes = graph.topo_sort()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: microsoft/nni
Commit Name: d165905d0ba24cfba414b8e0c20fa8d7c8ab6a6e
Time: 2020-12-10
Author: Quanlu.Zhang@microsoft.com
File Name: nni/retiarii/codegen/pytorch.py
Class Name:
Method Name: graph_to_pytorch_model


Project Name: keras-team/keras
Commit Name: f60313e29657b2afb6a02f28dba5936bc0dd09e6
Time: 2018-09-14
Author: gabrieldemarmiesse@gmail.com
File Name: tests/keras/test_callbacks.py
Class Name:
Method Name: test_CSVLogger


Project Name: aleju/imgaug
Commit Name: 2a1bd4c93a998d16516d82893401b346d66a95e9
Time: 2019-07-19
Author: kontakt@ajung.name
File Name: imgaug/dtypes.py
Class Name:
Method Name: get_minimal_dtype


Project Name: NTMC-Community/MatchZoo
Commit Name: cea292769af4ac688649573a11b20f4d69024e3d
Time: 2019-05-15
Author: 469413628@qq.com
File Name: tests/unit_test/processor_units/test_processor_units.py
Class Name:
Method Name: test_bert_tokenizer_unit