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]
In pattern: SUPERPATTERN
Frequency: 4
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: Theano/Theano
Commit Name: b7d23606db54f1b60d0efae50922549234b20661
Time: 2017-07-31
Author: abergeron@gmail.com
File Name: theano/configdefaults.py
Class Name:
Method Name:
Project Name: Theano/Theano
Commit Name: f8a7c0edb2c4123d032fa32073c7356a7a17d9f0
Time: 2017-08-07
Author: stevenbocco@gmail.com
File Name: theano/configdefaults.py
Class Name:
Method Name:
Project Name: KhronosGroup/NNEF-Tools
Commit Name: 0219a509c34bb5b291bee497cbd658d6a5922171
Time: 2020-11-17
Author: viktor.gyenes@aimotive.com
File Name: nnef_tools/io/tf/graphdef/__init__.py
Class Name:
Method Name: save_default_graph