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

Before Change


        graph = self.trace.graph
        _logger.debug(graph)
        // build output mapping, from output debugName to its node
        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

After Change


        for node in graph.nodes():
            if node.kind() == CONSTANT_KIND:
                continue
            for x in node.outputs():
                if x.node().kind() == CONSTANT_KIND:
                    continue
                output_to_node[x.debugName()].append(node)
                assert len(output_to_node[x.debugName()]) <= 1, "One output cannot be generated by multiple nodes %s" % x.debugName()
            for x in node.inputs():
                if x.node().kind() == CONSTANT_KIND:
                    continue
                input_to_node[x.debugName()].append(node)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: NervanaSystems/coach
Commit Name: a1c56edd98898ed25db9c6ed1e05b50a0a85e097
Time: 2018-11-23
Author: gal.leibovich@intel.com
File Name: rl_coach/memories/non_episodic/differentiable_neural_dictionary.py
Class Name:
Method Name: load_dnd


Project Name: NifTK/NiftyNet
Commit Name: 37e2656912c22d8aefe94a1bab2eefa7c4f54ccc
Time: 2018-03-23
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/deconvolution.py
Class Name:
Method Name: infer_output_dims