class_docstr: The :class:`BinaryDense` class is a binary fully connected layer, which weights are either -1 or 1 while inferencing.
  
  Note that, the bias vector would not be binarized.
  
  Parameters
  ----------
  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 inference. (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 : None or str
      A unique layer name.
code: def __init__(
      self,
      n_units=100,
      act=None,
      use_gemm=False,
      W_init=tl.initializers.truncated_normal(stddev=0.05),
      b_init=tl.initializers.constant(value=0.0),
      in_channels=None,
      name=None,  #'binary_dense',
  ):
      super().__init__(name, act=act)
      self.n_units = n_units
      self.use_gemm = use_gemm
      self.W_init = W_init
      self.b_init = b_init
      self.in_channels = in_channels
  
      if self.in_channels is not None:
          self.build((None, self.in_channels))
          self._built = True
  
      logging.info(
          "BinaryDense  %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/binary_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 quantize
label_desc: Use image node_id 1 to create a new BinaryDense object from inherited base classes: Layer with example: obj = BinaryDense(n_units, act, use_gemm, W_init, b_init, in_channels, name)