TrainingExtensions/tensorflow/src/python/aimet_tensorflow/quantsim_config/quantsim_config.py
def _get_quantize_ops_to_modify(input_output_quantize_ops: QuantizerListType, setting_name: str) -> List[tf.Operation]:
    """
    Given the tuple containing lists of quantize ops to modify under different situations, identify a list of quantize
    ops to modify given the specific setting name and quantizer setting.
    :param input_output_quantize_ops: Tuple containing 2 lists:
        - List of quantize ops to change if op's input quantizer setting is set
        - List of quantize ops to change if op's output quantizer setting is set
    :param setting_name: String representing the setting to be modified
    :return: List of quantize ops to modify given the specific setting name and quantizer setting.
    """
    input_list, output_list = input_output_quantize_ops

    if setting_name == ConfigDictKeys.IS_INPUT_QUANTIZED:
        return input_list
    if setting_name == ConfigDictKeys.IS_OUTPUT_QUANTIZED:
        return output_list
    if setting_name == ConfigDictKeys.IS_SYMMETRIC:
        # Will modify all input and output quantizers in the False case
        return input_list + output_list
    logger.error('Encountered unrecognized case for setting name %s', setting_name)
    raise AssertionError

    Given the tuple containing lists of quantize ops to modify under different situations, identify a list of quantize
    ops to modify given the specific setting name and quantizer setting.
    :param input_output_quantize_ops: Tuple containing 2 lists:
        - List of quantize ops to change if op's input quantizer setting is set
        - List of quantize ops to change if op's output quantizer setting is set
    :param setting_name: String representing the setting to be modified
    :return: List of quantize ops to modify given the specific setting name and quantizer setting.
    
Given the tuple containing lists of quantize ops to modify under different situations, identify a list of quantize
ops to modify given the specific setting name and quantizer setting.
Given the tuple containing lists of quantize ops to modify under different situations identify a list of quantize ops to modify given the specific setting name and quantizer setting .
def _get_quantize_ops_to_modify(input_output_quantize_ops: QuantizerListType, setting_name: str) -> List[tf.Operation]:
    input_list, output_list = input_output_quantize_ops
    if setting_name == ConfigDictKeys.IS_INPUT_QUANTIZED:
        return input_list
    if setting_name == ConfigDictKeys.IS_OUTPUT_QUANTIZED:
        return output_list
    if setting_name == ConfigDictKeys.IS_SYMMETRIC:
        return input_list + output_list
    logger.error('Encountered unrecognized case for setting name %s', setting_name)
    raise AssertionError
def _get_quantize_ops_to_modify ( input_output_quantize_ops : QuantizerListType , setting_name : str ) -> List [ tf . Operation ] : input_list , output_list = input_output_quantize_ops if setting_name == ConfigDictKeys . IS_INPUT_QUANTIZED : return input_list if setting_name == ConfigDictKeys . IS_OUTPUT_QUANTIZED : return output_list if setting_name == ConfigDictKeys . IS_SYMMETRIC : return input_list + output_list logger . error ( 'Encountered unrecognized case for setting name %s' , setting_name ) raise AssertionError
Given the tuple containing lists of quantize ops to modify under different situations, identify a list of quantize
ops to modify given the specific setting name and quantizer setting.
Given the tuple containing lists of quantize ops to modify under different situations identify a list of quantize ops to modify given the specific setting name and quantizer setting .
"""
    Given the tuple containing lists of quantize ops to modify under different situations, identify a list of quantize
    ops to modify given the specific setting name and quantizer setting.
    :param input_output_quantize_ops: Tuple containing 2 lists:
        - List of quantize ops to change if op's input quantizer setting is set
        - List of quantize ops to change if op's output quantizer setting is set
    :param setting_name: String representing the setting to be modified
    :return: List of quantize ops to modify given the specific setting name and quantizer setting.
    """ # Will modify all input and output quantizers in the False case
List of quantize ops to modify given the specific setting name and quantizer setting.
List of quantize ops to modify given the specific setting name and quantizer setting .
input_output_quantize_ops
QuantizerListType
Tuple containing 2 lists:
List of quantize ops to change if op's input quantizer setting is set
List of quantize ops to change if op's output quantizer setting is set
Tuple containing 2 lists : List of quantize ops to change if op ' s input quantizer setting is set List of quantize ops to change if op ' s output quantizer setting is set
setting_name
str
String representing the setting to be modified
String representing the setting to be modified