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

Before Change


    outputs = []

    input_index = 0
    model_inputs = dict()
    for node in nodes:
        node_inputs = list(node.inputs())
        node_input_names = []
        for node_input in node_inputs:

After Change


    outputs = []

    input_index = 0
    model_inputs = ["input" + i for i in graph_inputs]

    for node in nodes:
        node_inputs = list(node.inputs())
        // print(node_inputs, model_inputs)
        node_input_names = []
        
        for node_input in node_inputs:
            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: chakki-works/doccano
Commit Name: 35e4a3539574f702b98f57edeb51e5453f7ff94c
Time: 2019-10-25
Author: clewolff@microsoft.com
File Name: app/api/views.py
Class Name: StatisticsAPI
Method Name: get


Project Name: jazzband/django-debug-toolbar
Commit Name: 842ed8a0e9d4e4ccadd6114147f8e2805b0a251c
Time: 2013-11-01
Author: aymeric.augustin@m4x.org
File Name: debug_toolbar/panels/headers.py
Class Name: HeaderDebugPanel
Method Name: process_request