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"]]
        for i, s in enumerate(n["inputs"]):
            n["inputs"][i] = mapping[s]
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: lanpa/tensorboardX
Commit Name: 71e3ab5600687fc5d8b5e891fbc12f82869c11d7
Time: 2018-11-08
Author: teffland@users.noreply.github.com
File Name: tensorboardX/pytorch_graph.py
Class Name:
Method Name: parse


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