class_docstr: The :class:`DorefaDense` class is a binary fully connected layer, which weights are 'bitW' bits and the output of the previous layer
  are 'bitA' bits while inferencing.
  
  Note that, the bias vector would not be binarized.
  
  Parameters
  ----------
  bitW : int
      The bits of this layer's parameter
  bitA : int
      The bits of the output of previous layer
  n_units : int
      The number of units of this layer.
  act : activation function
      The activation function of this layer, usually set to ``tf.act.sign`` or apply :class:`Sign` after :class:`BatchNorm`.
  use_gemm : boolean
      If True, use gemm instead of ``tf.matmul`` for inferencing. (TODO).
  W_init : initializer
      The initializer for the weight matrix.
  b_init : initializer or None
      The initializer for the bias vector. If None, skip biases.
  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.
code: def forward(self, inputs):
      inputs = quantize_active(cabs(inputs), self.bitA)
      W_ = quantize_weight(self.W, self.bitW)
      outputs = tf.matmul(inputs, W_)
      # self.outputs = xnor_gemm(self.inputs, W) # TODO
      if self.b_init is not None:
          outputs = tf.nn.bias_add(outputs, self.b, name="bias_add")
          # self.outputs = xnor_gemm(self.inputs, W) + b # TODO
      if self.act:
          outputs = self.act(outputs)
      return outputs
  
file_path: TensorLayer/tensorlayer/layers/dense/dorefa_dense.py
imports: import tensorflow
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias
  from tensorlayer.layers.core import Layer
  from tensorlayer.layers.utils import cabs, quantize_active, quantize_weight
label_desc: Use image node_id 4 for calling the DorefaDense obj's underlying member method code with example usage: obj.forward(inputs) and returns: outputs