def _call(self, inputs):
    x = inputs
    if self.sparse_inputs:
        x = sparse_dropout(x, (1 - self.dropout), self.num_features_nonzero)
    else:
        x = tf.nn.dropout(x, (1 - self.dropout))
    supports = list()
    for k in range(2):
        w_k = self.support[:, :, k]
        G_k = self.vars[('weights_' + str(k))]
        res = dot(x, G_k, sparse=self.sparse_inputs)
        res = dot(w_k, res)
        supports.append(res)
    output = tf.add_n(supports)
    if self.bias:
        output += self.vars['bias']
    return self.act(output)
def _call(self, inputs):
    x = inputs
    if self.sparse_inputs:
        x = sparse_dropout(x, (1 - self.dropout), self.num_features_nonzero)
    else:
        x = tf.nn.dropout(x, (1 - self.dropout))
    supports = list()
    for k in range(2):
        w_k = self.support[:, :, k]
        G_k = self.vars[('weights_' + str(k))]
        res = dot(x, G_k, sparse=self.sparse_inputs)
        res = dot(w_k, res)
        supports.append(res)
    output = tf.add_n(supports)
    if self.bias:
        output += self.vars['bias']
    return self.act(output)