TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _update_inputs_map(curr_inputs: List[torch._C.TensorType], higher_level_inputs: List[torch._C.TensorType],
                       inputs_map: Dict[torch._C.TensorType, torch._C.TensorType]):
    """
    Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph.
    :param curr_inputs: Inputs to the current graph level
    :param higher_level_inputs: Corresponding inputs from a higher graph level
    :param inputs_map: Dictionary mapping low recursion level inputs to higher level equivalent inputs
    """
    # First index of curr_inputs refers to the current module itself, and not any actual input
    assert len(higher_level_inputs) == len(curr_inputs) - 1
    for idx, inp in enumerate(higher_level_inputs):
        if inp in inputs_map:
            inputs_map[curr_inputs[idx + 1]] = inputs_map[inp]
        else:
            inputs_map[curr_inputs[idx + 1]] = inp

    Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph.
    :param curr_inputs: Inputs to the current graph level
    :param higher_level_inputs: Corresponding inputs from a higher graph level
    :param inputs_map: Dictionary mapping low recursion level inputs to higher level equivalent inputs
    
Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph.
Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph .
def _update_inputs_map(curr_inputs: List[torch._C.TensorType], higher_level_inputs: List[torch._C.TensorType],
                       inputs_map: Dict[torch._C.TensorType, torch._C.TensorType]):
    assert len(higher_level_inputs) == len(curr_inputs) - 1
    for idx, inp in enumerate(higher_level_inputs):
        if inp in inputs_map:
            inputs_map[curr_inputs[idx + 1]] = inputs_map[inp]
        else:
            inputs_map[curr_inputs[idx + 1]] = inp
def _update_inputs_map ( curr_inputs : List [ torch . _C . TensorType ] , higher_level_inputs : List [ torch . _C . TensorType ] , inputs_map : Dict [ torch . _C . TensorType , torch . _C . TensorType ] ) : assert len ( higher_level_inputs ) == len ( curr_inputs ) - 1 for idx , inp in enumerate ( higher_level_inputs ) : if inp in inputs_map : inputs_map [ curr_inputs [ idx + 1 ] ] = inputs_map [ inp ] else : inputs_map [ curr_inputs [ idx + 1 ] ] = inp
Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph.
Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph .
"""
    Update inputs_map with additional entries mapping higher_level_inputs to inputs of the current graph.
    :param curr_inputs: Inputs to the current graph level
    :param higher_level_inputs: Corresponding inputs from a higher graph level
    :param inputs_map: Dictionary mapping low recursion level inputs to higher level equivalent inputs
    """ # First index of curr_inputs refers to the current module itself, and not any actual input
curr_inputs
List[torch._C.TensorType]
Inputs to the current graph level
Inputs to the current graph level
higher_level_inputs
List[torch._C.TensorType]
Corresponding inputs from a higher graph level
Corresponding inputs from a higher graph level
inputs_map
Dict[torch._C.TensorType, torch._C.TensorType]
Dictionary mapping low recursion level inputs to higher level equivalent inputs
Dictionary mapping low recursion level inputs to higher level equivalent inputs