TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _get_module_instance(node: torch._C.Node,
                             node_name_to_module: Dict[str, torch.nn.Module]) -> torch.nn.Module:
        """
        Get the torch.nn.Module referenced by the node.
        :param node: trace graph node
        :param node_name_to_module: dictionary of module index by output_name referenced in the sub-graph
        :return: torch module corresponding to the node
        """
        input_name: str = node.input().debugName()
        attributes = ConnectedGraph._get_attribute_name(node)
        model = node_name_to_module[input_name]
        sub_model = getattr(model, attributes['name'])
        return sub_model

        Get the torch.nn.Module referenced by the node.
        :param node: trace graph node
        :param node_name_to_module: dictionary of module index by output_name referenced in the sub-graph
        :return: torch module corresponding to the node
        
Get the torch.nn.Module referenced by the node.
Get the torch . nn . Module referenced by the node .
def _get_module_instance(node: torch._C.Node,
                             node_name_to_module: Dict[str, torch.nn.Module]) -> torch.nn.Module:
        input_name: str = node.input().debugName()
        attributes = ConnectedGraph._get_attribute_name(node)
        model = node_name_to_module[input_name]
        sub_model = getattr(model, attributes['name'])
        return sub_model
def _get_module_instance ( node : torch . _C . Node , node_name_to_module : Dict [ str , torch . nn . Module ] ) -> torch . nn . Module : input_name : str = node . input ( ) . debugName ( ) attributes = ConnectedGraph . _get_attribute_name ( node ) model = node_name_to_module [ input_name ] sub_model = getattr ( model , attributes [ 'name' ] ) return sub_model
Get the torch.nn.Module referenced by the node.
Get the torch . nn . Module referenced by the node .
"""
        Get the torch.nn.Module referenced by the node.
        :param node: trace graph node
        :param node_name_to_module: dictionary of module index by output_name referenced in the sub-graph
        :return: torch module corresponding to the node
        """
torch module corresponding to the node
torch module corresponding to the node
node
torch._C.Node
trace graph node
trace graph node
node_name_to_module
Dict[str, torch.nn.Module]
dictionary of module index by output_name referenced in the sub-graph
dictionary of module index by output_name referenced in the sub - graph