8af731463df46f6c73c933bdc45ed9a4ecd4e422,nni/retiarii/codegen/pytorch.py,,graph_to_pytorch_model,#Any#Any#,47

Before Change


            edge_codes.append(node.operation.to_forward_code(node.name, node.name, inputs))

    output_code = _format_inputs(graph.output_node)
    if not output_code:
        output_code = "None"

    linebreak = "\n        "
    return _PyTorchModelTemplate.format(
        graph_name=("Graph" if graph_name == "_graph" else graph_name),
        inputs=input_code,

After Change


    for node in nodes:
        if node.operation:
            pkg_name = node.operation.get_import_pkg()
            if pkg_name is not None:
                import_pkgs.add(pkg_name)
            node_code = node.operation.to_init_code(node.name)
            if node_code is not None:
                node_codes.append(node_code)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: microsoft/nni
Commit Name: 8af731463df46f6c73c933bdc45ed9a4ecd4e422
Time: 2020-11-17
Author: Quanlu.Zhang@microsoft.com
File Name: nni/retiarii/codegen/pytorch.py
Class Name:
Method Name: graph_to_pytorch_model


Project Name: dmlc/gluon-cv
Commit Name: ea5306a4e8fc9700022f93c3731fb1711e248a8e
Time: 2019-08-09
Author: jerryzh.cn@gmail.com
File Name: gluoncv/model_zoo/resnext.py
Class Name: Block
Method Name: __init__


Project Name: ray-project/ray
Commit Name: 34bae27ac7d3c39335a2b8c7d4cd4efba56aa398
Time: 2020-06-12
Author: ekhliang@gmail.com
File Name: rllib/execution/replay_buffer.py
Class Name: LocalReplayBuffer
Method Name: add_batch


Project Name: keras-team/keras
Commit Name: 555ca942df407b8c1bf1d48383c60fa1bf09cc1d
Time: 2019-08-28
Author: francois.chollet@gmail.com
File Name: keras/utils/layer_utils.py
Class Name:
Method Name: count_params