TrainingExtensions/tensorflow/src/python/aimet_tensorflow/quantsim.py
def configure_quantization_ops(self, conn_graph: ConnectedGraph, ops_with_param_names: List[str],
                                   indices: List[int], activation_op_names: List[str]):
        """
        Configure inserted quantize ops using config file
        :param conn_graph: Connected graph of the model
        :param ops_with_param_names: List of ops for which param quantization ops were inserted for
        :param indices: List of input indices (one-to-one for each entry in ops)
        :param activation_op_names: List of ops for which activation quantization ops were inserted for
        """
        if not conn_graph:
            _logger.error('Connected graph passed into configure_quantization_ops() is None. If manual insertion of '
                          'quantization ops is being done, and get_ops_to_quantize_activations_for() has been '
                          'overriden, please override configure_quantization_ops() as well.')
            raise AssertionError
        op_to_quant_ops_dict = create_op_to_quant_ops_dict(self.session.graph, conn_graph,
                                                           ops_with_param_names, indices,
                                                           activation_op_names)
        self._quantsim_configurator.configure_quantizers(op_to_quant_ops_dict, self._param_quantizers,
                                                         self._activation_quantizers)

        Configure inserted quantize ops using config file
        :param conn_graph: Connected graph of the model
        :param ops_with_param_names: List of ops for which param quantization ops were inserted for
        :param indices: List of input indices (one-to-one for each entry in ops)
        :param activation_op_names: List of ops for which activation quantization ops were inserted for
        
Configure inserted quantize ops using config file
Configure inserted quantize ops using config file
def configure_quantization_ops(self, conn_graph: ConnectedGraph, ops_with_param_names: List[str],
                                   indices: List[int], activation_op_names: List[str]):
        if not conn_graph:
            _logger.error('Connected graph passed into configure_quantization_ops() is None. If manual insertion of '
                          'quantization ops is being done, and get_ops_to_quantize_activations_for() has been '
                          'overriden, please override configure_quantization_ops() as well.')
            raise AssertionError
        op_to_quant_ops_dict = create_op_to_quant_ops_dict(self.session.graph, conn_graph,
                                                           ops_with_param_names, indices,
                                                           activation_op_names)
        self._quantsim_configurator.configure_quantizers(op_to_quant_ops_dict, self._param_quantizers,
                                                         self._activation_quantizers)
def configure_quantization_ops ( self , conn_graph : ConnectedGraph , ops_with_param_names : List [ str ] , indices : List [ int ] , activation_op_names : List [ str ] ) : if not conn_graph : _logger . error ( 'Connected graph passed into configure_quantization_ops() is None. If manual insertion of ' 'quantization ops is being done, and get_ops_to_quantize_activations_for() has been ' 'overriden, please override configure_quantization_ops() as well.' ) raise AssertionError op_to_quant_ops_dict = create_op_to_quant_ops_dict ( self . session . graph , conn_graph , ops_with_param_names , indices , activation_op_names ) self . _quantsim_configurator . configure_quantizers ( op_to_quant_ops_dict , self . _param_quantizers , self . _activation_quantizers )
Configure inserted quantize ops using config file
Configure inserted quantize ops using config file
"""
        Configure inserted quantize ops using config file
        :param conn_graph: Connected graph of the model
        :param ops_with_param_names: List of ops for which param quantization ops were inserted for
        :param indices: List of input indices (one-to-one for each entry in ops)
        :param activation_op_names: List of ops for which activation quantization ops were inserted for
        """
self
conn_graph
ConnectedGraph
Connected graph of the model
Connected graph of the model
ops_with_param_names
List[str]
List of ops for which param quantization ops were inserted for
List of ops for which param quantization ops were inserted for
indices
List[int]
List of input indices (one-to-one for each entry in ops)
List of input indices ( one - to - one for each entry in ops )
activation_op_names
List[str]
List of ops for which activation quantization ops were inserted for
List of ops for which activation quantization ops were inserted for