import tensorflow as tf
'''Content Discriminator'''
class content_disc(object):
    def __init__(self, disc_H, disc_lastH):
        self.disc_H = disc_H
        self.disc_lastH = disc_lastH
        self.name = 'cont_disc'
    def __call__(self, inputs):
        with tf.variable_scope(self.name, reuse=tf.AUTO_REUSE):
            # layer1 = tf.layers.dense(inputs, 512, use_bias=True)
            layer1 = tf.layers.dense(inputs, 100, use_bias=True)
            layer1 = tf.nn.relu(layer1)

            layer2 = tf.layers.dense(layer1, self.disc_H)
            layer2 = tf.nn.relu(layer2)

            layer3= tf.layers.dense(layer2, self.disc_H)
            layer3 = tf.nn.relu(layer3)

            layer4 = tf.layers.dense(layer3, self.disc_lastH)
            layer4 = tf.nn.relu(layer4)

            output = tf.layers.dense(layer4, 1)
            # output = tf.nn.sigmoid(output)
            return output
    @property
    def vars(self):
        return [var for var in tf.global_variables() if self.name in var.name]
