1cf4c73059ba4435f37a93a316edbd426263cbf0,pytorch2keras/converter.py,,pytorch_to_keras,#Any#Any#Any#Any#Any#Any#Any#,141

Before Change



        if len(node_input_names) == 0:
            if len(node_inputs) > 0:
                if node_inputs[0] in model_inputs:
                    node_input_names.append(model_inputs[node_inputs[0]])
                else:
                    input_name = "input{0}".format(input_index)
                    if input_name not in layers:
                        continue
                    node_input_names.append(input_name)
                    input_index += 1
                    model_inputs[node_inputs[0]] = input_name

        node_type = node.kind()
        // print(dir(node))

After Change


            print(get_node_id(node_input.node()))
            if node_input.node().scopeName():
                node_input_names.append(get_node_id(node_input.node()))
            if "input{0}".format(get_node_id(node_input.node())) in model_inputs:
                node_input_names.append("input{0}".format(get_node_id(node_input.node())))
        // print(node_input_names)

        // if len(node_input_names) == 0:
        //     if len(node_inputs) > 0:
        //         if node_inputs[0] in model_inputs:
        //             node_input_names.append(model_inputs[node_inputs[0]])
        //         else:
        //             input_name = "input{0}".format(input_index)
        //             if input_name not in layers:
        //                 continue
        //             node_input_names.append(input_name)
        //             input_index += 1
        //             model_inputs[node_inputs[0]] = input_name

        node_type = node.kind()
        // print(dir(node))

        node_scope_name = node.scopeName()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: nerox8664/pytorch2keras
Commit Name: 1cf4c73059ba4435f37a93a316edbd426263cbf0
Time: 2018-12-20
Author: nerox8664@gmail.com
File Name: pytorch2keras/converter.py
Class Name:
Method Name: pytorch_to_keras


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: _expand_module_node


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: _expand_key_func_node