class_docstr: The :class:`QuanDenseWithBN` class is a quantized fully connected layer with BN, which weights are 'bitW' bits and the output of the previous layer
  are 'bitA' bits while inferencing.
  
  Parameters
  ----------
  n_units : int
      The number of units of this layer.
  act : activation function
      The activation function of this layer.
  decay : float
      A decay factor for `ExponentialMovingAverage`.
      Suggest to use a large value for large dataset.
  epsilon : float
      Eplison.
  is_train : boolean
      Is being used for training or inference.
  beta_init : initializer or None
      The initializer for initializing beta, if None, skip beta.
      Usually you should not skip beta unless you know what happened.
  gamma_init : initializer or None
      The initializer for initializing gamma, if None, skip gamma.
  bitW : int
      The bits of this layer's parameter
  bitA : int
      The bits of the output of previous layer
  use_gemm : boolean
      If True, use gemm instead of ``tf.matmul`` for inferencing. (TODO).
  W_init : initializer
      The initializer for the the weight matrix.
  W_init_args : dictionary
      The arguments for the weight matrix initializer.
  in_channels: int
      The number of channels of the previous layer.
      If None, it will be automatically detected when the layer is forwarded for the first time.
  name : a str
      A unique layer name.
  
  Examples
  ---------
  >>> import tensorlayer as tl
  >>> net = tl.layers.Input([50, 256])
  >>> layer = tl.layers.QuanDenseWithBN(128, act='relu', name='qdbn1')(net)
  >>> print(layer)
  >>> net = tl.layers.QuanDenseWithBN(256, act='relu', name='qdbn2')(net)
  >>> print(net)
code: def __init__(
      self,
      n_units=100,
      act=None,
      decay=0.9,
      epsilon=1e-5,
      is_train=False,
      bitW=8,
      bitA=8,
      gamma_init=tl.initializers.truncated_normal(stddev=0.05),
      beta_init=tl.initializers.truncated_normal(stddev=0.05),
      use_gemm=False,
      W_init=tl.initializers.truncated_normal(stddev=0.05),
      W_init_args=None,
      in_channels=None,
      name=None,  # 'quan_dense_with_bn',
  ):
      super(QuanDenseWithBN, self).__init__(
          act=act, W_init_args=W_init_args, name=name
      )
      self.n_units = n_units
      self.decay = decay
      self.epsilon = epsilon
      self.is_train = is_train
      self.bitW = bitW
      self.bitA = bitA
      self.gamma_init = gamma_init
      self.beta_init = beta_init
      self.use_gemm = use_gemm
      self.W_init = W_init
      self.in_channels = in_channels
  
      if self.in_channels is not None:
          self.build((None, self.in_channels))
          self._built = True
  
      logging.info(
          "QuanDenseLayerWithBN  %s: %d %s"
          % (
              self.name,
              n_units,
              self.act.__name__
              if self.act is not None
              else "No Activation",
          )
      )
  
file_path: TensorLayer/tensorlayer/layers/dense/quan_dense_bn.py
imports: import tensorflow
  from tensorflow.python.training import moving_averages
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias
  from tensorlayer.layers.core import Layer
  from tensorlayer.layers.utils import quantize_active_overflow, quantize_weight_overflow
label_desc: Use image node_id 1 to create a new QuanDenseWithBN object from inherited base classes: Layer with example: obj = QuanDenseWithBN(n_units, act, decay, epsilon, is_train, bitW, bitA, gamma_init, beta_init, use_gemm, W_init, W_init_args, in_channels, name)