class_docstr: Mixin with helper functions for quantizers.
class_docstr_tok: ["Mixin","with","helper","functions","for","quantizers","."]
docstr: Add min and max vars to layer.
code: def _add_range_weights(
      self, layer, name, per_axis=False, tensor_shape=None
  ):
      """Add min and max vars to layer."""
      shape = None
      if per_axis and tensor_shape is not None:
          shape = tensor_shape[-1]
  
      min_weight = layer.add_weight(
          name + "_min",
          initializer=keras.initializers.Constant(-6.0),
          trainable=False,
          shape=shape,
      )
      max_weight = layer.add_weight(
          name + "_max",
          initializer=keras.initializers.Constant(6.0),
          trainable=False,
          shape=shape,
      )
  
      return {"min_var": min_weight, "max_var": max_weight}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quant_ops
label_desc: Use image node_id 1 for calling the _QuantizeHelper obj's underlying member method code with example usage: obj._add_range_weights(layer, name, per_axis, tensor_shape) and returns: dict