def __init__(self, input_dim, output_dim, placeholders, dropout=0.0, sparse_inputs=False, act=tf.nn.relu, bias=False, featureless=False, **kwargs):
    super(Dense, self).__init__(**kwargs)
    if dropout:
        self.dropout = placeholders['dropout']
    else:
        self.dropout = 0.0
    self.act = act
    self.sparse_inputs = sparse_inputs
    self.featureless = featureless
    self.bias = bias
    self.num_features_nonzero = placeholders['num_features_nonzero']
    with tf.variable_scope((self.name + '_vars')):
        self.vars['weights'] = glorot([input_dim, output_dim], name='weights')
        if self.bias:
            self.vars['bias'] = zeros([output_dim], name='bias')
    if self.logging:
        self._log_vars()
def __init__(self, input_dim, output_dim, placeholders, dropout=0.0, sparse_inputs=False, act=tf.nn.relu, bias=False, featureless=False, **kwargs):
    super(Dense, self).__init__(**kwargs)
    if dropout:
        self.dropout = placeholders['dropout']
    else:
        self.dropout = 0.0
    self.act = act
    self.sparse_inputs = sparse_inputs
    self.featureless = featureless
    self.bias = bias
    self.num_features_nonzero = placeholders['num_features_nonzero']
    with tf.variable_scope((self.name + '_vars')):
        self.vars['weights'] = glorot([input_dim, output_dim], name='weights')
        if self.bias:
            self.vars['bias'] = zeros([output_dim], name='bias')
    if self.logging:
        self._log_vars()