class_docstr: Dense layer.
class_docstr_tok: ["Dense","layer","."]
code: def __init__(
      self,
      input_dim,
      output_dim,
      dropout=0.0,
      act=tf.nn.relu,
      placeholders=None,
      bias=True,
      featureless=False,
      sparse_inputs=False,
      **kwargs,
  ):
      super(Dense, self).__init__(**kwargs)
  
      self.dropout = dropout
  
      self.act = act
      self.featureless = featureless
      self.bias = bias
      self.input_dim = input_dim
      self.output_dim = output_dim
  
      # helper variable for sparse dropout
      self.sparse_inputs = sparse_inputs
      if sparse_inputs:
          self.num_features_nonzero = placeholders[
              "num_features_nonzero"
          ]
  
      with tf.variable_scope(self.name + "_vars"):
          self.vars["weights"] = tf.get_variable(
              "weights",
              shape=(input_dim, output_dim),
              dtype=tf.float32,
              initializer=tf.contrib.layers.xavier_initializer(),
              regularizer=tf.contrib.layers.l2_regularizer(
                  FLAGS.weight_decay
              ),
          )
          if self.bias:
              self.vars["bias"] = zeros([output_dim], name="bias")
  
      if self.logging:
          self._log_vars()
  
file_path: GraphSAGE/graphsage/layers.py
imports: from __future__ import division
  from __future__ import print_function
  import tensorflow
  from graphsage.inits import zeros
label_desc: Use image node_id 1 to create a new Dense object from inherited base classes: Layer with example: obj = Dense(input_dim, output_dim, dropout, act, placeholders, bias, featureless, sparse_inputs)