parameters: (self)
docstring: The quantization range is calculated according to num_bits.
docstring_summary: The quantization range is calculated according to num_bits.
docstring_tokens: The quantization range is calculated according to num_bits .
function: def _calculate_quant_max(self):
          """
          The quantization range is calculated according to num_bits.
          """
          if not self.neg_trunc:
              self._quant_max = (1 << (self.num_bits - 1)) - 1
          else:
              self._quant_max = (1 << self.num_bits) - 1
function_tokens: def _calculate_quant_max ( self ) : if not self . neg_trunc : self . _quant_max = ( 1 << ( self . num_bits - 1 ) ) - 1 else : self . _quant_max = ( 1 << self . num_bits ) - 1