TrainingExtensions/tensorflow/src/python/aimet_tensorflow/quantsim.py
def _create_encoding_min_max_vars(self, q_op_name: str) -> (tf.Variable, tf.Variable):
        """
        creates encoding min and max variables for quant op.
        :param q_op_name: name of quantize op
        :return: encoding min and max as tf.Variable type
        """

        is_trainable = False
        if self._quant_scheme in [QuantScheme.training_range_learning_with_tf_init,
                                  QuantScheme.training_range_learning_with_tf_enhanced_init]:
            is_trainable = True

        encoding_min_var = tf.Variable(initial_value=0.0,
                                       name=q_op_name + '_encoding_min',
                                       trainable=is_trainable, dtype=tf.double)
        encoding_max_var = tf.Variable(initial_value=0.0,
                                       name=q_op_name + '_encoding_max',
                                       trainable=is_trainable, dtype=tf.double)

        return encoding_min_var, encoding_max_var

        creates encoding min and max variables for quant op.
        :param q_op_name: name of quantize op
        :return: encoding min and max as tf.Variable type
        
creates encoding min and max variables for quant op.
creates encoding min and max variables for quant op .
def _create_encoding_min_max_vars(self, q_op_name: str) -> (tf.Variable, tf.Variable):
        is_trainable = False
        if self._quant_scheme in [QuantScheme.training_range_learning_with_tf_init,
                                  QuantScheme.training_range_learning_with_tf_enhanced_init]:
            is_trainable = True
        encoding_min_var = tf.Variable(initial_value=0.0,
                                       name=q_op_name + '_encoding_min',
                                       trainable=is_trainable, dtype=tf.double)
        encoding_max_var = tf.Variable(initial_value=0.0,
                                       name=q_op_name + '_encoding_max',
                                       trainable=is_trainable, dtype=tf.double)
        return encoding_min_var, encoding_max_var
def _create_encoding_min_max_vars ( self , q_op_name : str ) -> ( tf . Variable , tf . Variable ) : is_trainable = False if self . _quant_scheme in [ QuantScheme . training_range_learning_with_tf_init , QuantScheme . training_range_learning_with_tf_enhanced_init ] : is_trainable = True encoding_min_var = tf . Variable ( initial_value = 0.0 , name = q_op_name + '_encoding_min' , trainable = is_trainable , dtype = tf . double ) encoding_max_var = tf . Variable ( initial_value = 0.0 , name = q_op_name + '_encoding_max' , trainable = is_trainable , dtype = tf . double ) return encoding_min_var , encoding_max_var
creates encoding min and max variables for quant op.
creates encoding min and max variables for quant op .
"""
        creates encoding min and max variables for quant op.
        :param q_op_name: name of quantize op
        :return: encoding min and max as tf.Variable type
        """
encoding min and max as tf.Variable type
encoding min and max as tf . Variable type
self
q_op_name
str
name of quantize op
name of quantize op