parameters: (inputs, quantize_pos,
                                                   bit_width, reduce_dims)
return_statement: return dequantized, grad_fn
docstring: The fake quantization operation kernel with py3 symmetry round mode.
  
    Args:
      inputs: a tensor containing values to be quantized.
      quantize_pos: the quantize postion
      bit_width: the bit width
      reduce_dims: the dimensions to be reduces for per_channel quantization
    Returns:
      a tensor containing quantized values.
docstring_summary: The fake quantization operation kernel with py3 symmetry round mode.
docstring_tokens: The fake quantization operation kernel with py3 symmetry round mode .
function: def fake_quantize_with_quantize_pos_py3_sym_perc(inputs, quantize_pos,
                                                   bit_width, reduce_dims):
    """The fake quantization operation kernel with py3 symmetry round mode.
  
    Args:
      inputs: a tensor containing values to be quantized.
      quantize_pos: the quantize postion
      bit_width: the bit width
      reduce_dims: the dimensions to be reduces for per_channel quantization
    Returns:
      a tensor containing quantized values.
    """
  
    with tf.name_scope("FakeQuantizeWithQuantizePosPy3SymPerC"):
      float_bit_width = tf.cast(bit_width, dtype=tf.float32, name="bit_width")
      bound = tf.math.pow(2.0, float_bit_width - 1)
      q_min = tf.math.negative(bound, name="q_min")
      if narrow_range:
        q_min = q_min + 1
      q_max = tf.math.subtract(bound, 1, name="q_max")
      scale = tf.math.pow(2.0, quantize_pos, name="scale")
  
      quantized = py3_sym_quantize(inputs, scale, q_min, q_max)
      dequantized = sym_dequantize(quantized, scale, q_min, q_max)
  
    def grad_fn(dy):
      return dy, None, None, None
  
    return dequantized, grad_fn
function_tokens: def fake_quantize_with_quantize_pos_py3_sym_perc ( inputs , quantize_pos , bit_width , reduce_dims ) : with tf . name_scope ( "FakeQuantizeWithQuantizePosPy3SymPerC" ) : float_bit_width = tf . cast ( bit_width , dtype = tf . float32 , name = "bit_width" ) bound = tf . math . pow ( 2.0 , float_bit_width - 1 ) q_min = tf . math . negative ( bound , name = "q_min" ) if narrow_range : q_min = q_min + 1 q_max = tf . math . subtract ( bound , 1 , name = "q_max" ) scale = tf . math . pow ( 2.0 , quantize_pos , name = "scale" ) quantized = py3_sym_quantize ( inputs , scale , q_min , q_max ) dequantized = sym_dequantize ( quantized , scale , q_min , q_max ) def grad_fn ( dy ) : return dy , None , None , None return dequantized , grad_fn