5619f0a742cfee882b51b6798215362e227c2732,tensorboardX/graph.py,,parse,#Any#,14

Before Change


    for n in graph.nodes():
        attrs = {k: n[k] for k in n.attributeNames()}
        attrs = str(attrs).replace(""", " ")  // singlequote will be escaped by tensorboard
        if any(i.uniqueName() not in scope.keys() for i in n.inputs()):  // 0.3.1 workaround
            continue
        inputs = [replace(i.uniqueName(), scope) for i in n.inputs()]
        outputnode = next(iter(n.outputs()))  // FIXME: only first output is considered

After Change



    mapping = {}
    for n in nodes:
        mapping[n["name"]] = scope[n["name"]] + "/" + \
            n["op"].replace("onnx::", "") + "_" + n["name"]
    for n in nodes:
        n["name"] = mapping[n["name"]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: lanpa/tensorboardX
Commit Name: 5619f0a742cfee882b51b6798215362e227c2732
Time: 2018-04-28
Author: huang.dexter@gmail.com
File Name: tensorboardX/graph.py
Class Name:
Method Name: parse


Project Name: nerox8664/pytorch2keras
Commit Name: 198d7eee040d0eb3c5183cdf50a6350db53a5623
Time: 2019-01-29
Author: nerox8664@gmail.com
File Name: pytorch2keras/converter.py
Class Name:
Method Name: pytorch_to_keras


Project Name: Microsoft/nni
Commit Name: f7b7edac5b9e329ffdda30d710f68db71d08e065
Time: 2020-11-22
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: nni/common/graph_utils.py
Class Name: TorchModuleGraph
Method Name: _build_graph