TrainingExtensions/torch/src/python/aimet_torch/model_preparer.py
def _create_module_for_reused_node(node: torch.fx.node, symbolic_traced_model: torch.fx.GraphModule) ->\
        torch.nn.Module:
    """
    For given reused/Duplicate node in symbolically traced model, create new module with same parameters as
    original module
    :param node: Reused/Duplicate torch.fx Node
    :param symbolic_traced_model: Symbolically traced model
    :return: New module
    """
    # Get the original module and return newly deep copied module
    module = _get_module_for_dotted_name(symbolic_traced_model, node.target)
    new_module = copy.deepcopy(module)

    return new_module

    For given reused/Duplicate node in symbolically traced model, create new module with same parameters as
    original module
    :param node: Reused/Duplicate torch.fx Node
    :param symbolic_traced_model: Symbolically traced model
    :return: New module
    
For given reused/Duplicate node in symbolically traced model, create new module with same parameters as
original module
For given reused / Duplicate node in symbolically traced model create new module with same parameters as original module
def _create_module_for_reused_node(node: torch.fx.node, symbolic_traced_model: torch.fx.GraphModule) ->\
        torch.nn.Module:
    module = _get_module_for_dotted_name(symbolic_traced_model, node.target)
    new_module = copy.deepcopy(module)
    return new_module
def _create_module_for_reused_node ( node : torch . fx . node , symbolic_traced_model : torch . fx . GraphModule ) -> torch . nn . Module : module = _get_module_for_dotted_name ( symbolic_traced_model , node . target ) new_module = copy . deepcopy ( module ) return new_module
For given reused/Duplicate node in symbolically traced model, create new module with same parameters as
original module
For given reused / Duplicate node in symbolically traced model create new module with same parameters as original module
"""
    For given reused/Duplicate node in symbolically traced model, create new module with same parameters as
    original module
    :param node: Reused/Duplicate torch.fx Node
    :param symbolic_traced_model: Symbolically traced model
    :return: New module
    """ # Get the original module and return newly deep copied module
None
node
torch.fx.node
Reused/Duplicate torch.fx Node
Reused / Duplicate torch . fx Node
symbolic_traced_model
torch.fx.GraphModule
Symbolically traced model
Symbolically traced model