f7b7edac5b9e329ffdda30d710f68db71d08e065,nni/common/graph_utils.py,TorchModuleGraph,_build_graph,#TorchModuleGraph#,624

Before Change


        output_to_node = {x.debugName(): n for n in graph.nodes()
                          for x in n.outputs()}
        // build input mapping, from input debugName to its node
        input_to_node = {x.debugName(): n for n in graph.nodes()
                         for x in n.inputs()}
        // build module mapping, from module name to all nodes (as list) under this module scope
        module_to_nodes = defaultdict(list)
        // the mapping of function (non-module in forward) to nodes, key is scope name
        func_to_nodes = defaultdict(list)

After Change


        // associate module name with their trace graph nodes
        for node in graph.nodes():
            if node.kind() == CONSTANT_KIND:
                continue
            module_name = self._get_module_name(node.scopeName())
            if module_name in self.leaf_modules:
                module_to_nodes[module_name].append(node)
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


Project Name: deepfakes/faceswap
Commit Name: 30e8a72933ece4470bcd112c6e1e6a3162fe0595
Time: 2018-09-02
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/alignments.py
Class Name: Reformat
Method Name: load_dfl


Project Name: snipsco/snips-nlu
Commit Name: 11778465b87dcacdf2ed4eb9eebc1e5257d6467d
Time: 2017-09-20
Author: adrien.ball@snips.net
File Name: snips_nlu/builtin_entities.py
Class Name:
Method Name: