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
        uname = outputnode.uniqueName()
        if outputnode.type().kind() == "TensorType":

After Change


                      "attr": str(n.type()),
                      "outputsize": outputsize})

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

Frequency: 3

Non-data size: 6

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: dnouri/skorch
Commit Name: e70c008f4184ab91412e6b40987e6bb2944384e7
Time: 2018-05-02
Author: benjamin.bossan@ottogroup.com
File Name: skorch/net.py
Class Name: NeuralNet
Method Name: set_params


Project Name: quantumlib/Cirq
Commit Name: baddb11a55a68c29cdc319bc9dde6e0a24ad32fe
Time: 2020-12-08
Author: dabacon@gmail.com
File Name: cirq/ionq/serializer.py
Class Name: Serializer
Method Name: serialize