TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _create_module_to_op_dict(ops: List[Op]) -> Dict[torch.nn.Module, Op]:
    """
    Utility to create dictionary mapping pytorch modules to connected graph Ops
    :param ops: List of connected graph Ops
    :return: Dictionary mapping pytorch modules to connected graph Ops
    """
    module_to_op_dict = {}
    for op in ops:
        if op.get_module():
            module_to_op_dict[op.get_module()] = op
    return module_to_op_dict

    Utility to create dictionary mapping pytorch modules to connected graph Ops
    :param ops: List of connected graph Ops
    :return: Dictionary mapping pytorch modules to connected graph Ops
    
Utility to create dictionary mapping pytorch modules to connected graph Ops
Utility to create dictionary mapping pytorch modules to connected graph Ops
def _create_module_to_op_dict(ops: List[Op]) -> Dict[torch.nn.Module, Op]:
    module_to_op_dict = {}
    for op in ops:
        if op.get_module():
            module_to_op_dict[op.get_module()] = op
    return module_to_op_dict
def _create_module_to_op_dict ( ops : List [ Op ] ) -> Dict [ torch . nn . Module , Op ] : module_to_op_dict = { } for op in ops : if op . get_module ( ) : module_to_op_dict [ op . get_module ( ) ] = op return module_to_op_dict
Utility to create dictionary mapping pytorch modules to connected graph Ops
Utility to create dictionary mapping pytorch modules to connected graph Ops
"""
    Utility to create dictionary mapping pytorch modules to connected graph Ops
    :param ops: List of connected graph Ops
    :return: Dictionary mapping pytorch modules to connected graph Ops
    """
Dictionary mapping pytorch modules to connected graph Ops
Dictionary mapping pytorch modules to connected graph Ops
ops
List[Op]
List of connected graph Ops
List of connected graph Ops