TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _parse_single_module_model(self, module: torch.nn.Module,
                                   graph: torch._C.Graph,
                                   ir_nodes_list: List[IrNode]) -> List[torch._C.TensorType]:
        """
        Create a node for the single module model.
        :param module:  Pytorch model composed on single module
        :param graph: trace graph representing the model
        :param ir_nodes_list: List of IrNodes created from traversing the trace graph
        :return: Node created for the module
        """
        op_type = self.get_op_type(type(module))
        node_inputs = [inp for inp in graph.inputs()]
        outputs = [output for output in graph.return_node().inputs()]
        ir_node = IrNode(node_type=op_type,
                         inputs=node_inputs[1:],
                         outputs=[output for output in graph.outputs()],
                         module=module)
        ir_nodes_list.append(ir_node)
        return outputs

        Create a node for the single module model.
        :param module:  Pytorch model composed on single module
        :param graph: trace graph representing the model
        :param ir_nodes_list: List of IrNodes created from traversing the trace graph
        :return: Node created for the module
        
Create a node for the single module model.
Create a node for the single module model .
def _parse_single_module_model(self, module: torch.nn.Module,
                                   graph: torch._C.Graph,
                                   ir_nodes_list: List[IrNode]) -> List[torch._C.TensorType]:
        op_type = self.get_op_type(type(module))
        node_inputs = [inp for inp in graph.inputs()]
        outputs = [output for output in graph.return_node().inputs()]
        ir_node = IrNode(node_type=op_type,
                         inputs=node_inputs[1:],
                         outputs=[output for output in graph.outputs()],
                         module=module)
        ir_nodes_list.append(ir_node)
        return outputs
def _parse_single_module_model ( self , module : torch . nn . Module , graph : torch . _C . Graph , ir_nodes_list : List [ IrNode ] ) -> List [ torch . _C . TensorType ] : op_type = self . get_op_type ( type ( module ) ) node_inputs = [ inp for inp in graph . inputs ( ) ] outputs = [ output for output in graph . return_node ( ) . inputs ( ) ] ir_node = IrNode ( node_type = op_type , inputs = node_inputs [ 1 : ] , outputs = [ output for output in graph . outputs ( ) ] , module = module ) ir_nodes_list . append ( ir_node ) return outputs
Create a node for the single module model.
Create a node for the single module model .
"""
        Create a node for the single module model.
        :param module:  Pytorch model composed on single module
        :param graph: trace graph representing the model
        :param ir_nodes_list: List of IrNodes created from traversing the trace graph
        :return: Node created for the module
        """
Node created for the module
Node created for the module
self
module
torch.nn.Module
Pytorch model composed on single module
Pytorch model composed on single module
graph
torch._C.Graph
trace graph representing the model
trace graph representing the model
ir_nodes_list
List[IrNode]
List of IrNodes created from traversing the trace graph
List of IrNodes created from traversing the trace graph