class_docstr: The :class:`DropconnectDense` class is :class:`Dense` with DropConnect
  behaviour which randomly removes connections between this layer and the previous
  layer according to a keeping probability.
  
  Parameters
  ----------
  keep : float
      The keeping probability.
      The lower the probability it is, the more activations are set to zero.
  n_units : int
      The number of units of this layer.
  act : activation function
      The activation function of this layer.
  W_init : weights initializer
      The initializer for the weight matrix.
  b_init : biases initializer
      The initializer for the bias vector.
  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 : str
      A unique layer name.
  
  Examples
  --------
  >>> net = tl.layers.Input([None, 784], name='input')
  >>> net = tl.layers.DropconnectDense(keep=0.8,
  ...         n_units=800, act=tf.nn.relu, name='relu1')(net)
  >>> net = tl.layers.DropconnectDense(keep=0.5,
  ...         n_units=800, act=tf.nn.relu, name='relu2')(net)
  >>> net = tl.layers.DropconnectDense(keep=0.5,
  ...         n_units=10, name='output')(net)
  
  References
  ----------
  - `Wan, L. (2013). Regularization of neural networks using dropconnect <http://machinelearning.wustl.edu/mlpapers/papers/icml2013_wan13>`__
code: def __init__(
      self,
      keep=0.5,
      n_units=100,
      act=None,
      W_init=tl.initializers.truncated_normal(stddev=0.05),
      b_init=tl.initializers.constant(value=0.0),
      in_channels=None,
      name=None,  # 'dropconnect',
  ):
      super().__init__(name, act=act)
  
      if isinstance(keep, numbers.Real) and not (
          keep > 0 and keep <= 1
      ):
          raise ValueError(
              "keep must be a scalar tensor or a float in the "
              "range (0, 1], got %g" % keep
          )
  
      self.keep = keep
      self.n_units = n_units
      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(
          "DropconnectDense %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/dropconnect.py
imports: import numbers
  import tensorflow
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias
  from tensorlayer.layers.core import Layer
label_desc: Use image node_id 1 to create a new DropconnectDense object from inherited base classes: Layer with example: obj = DropconnectDense(keep, n_units, act, W_init, b_init, in_channels, name)