Defining the discriminator

We know that discriminator returns the probability of the given image being real. We define the discriminator also as a feedforward network with three layers:

def discriminator(X,reuse=None):

with tf.variable_scope('discriminator',reuse=reuse):

hidden1 = tf.layers.dense(inputs=X,units=128,activation=tf.nn.leaky_relu)
hidden2 = tf.layers.dense(inputs=hidden1,units=128,activation=tf.nn.leaky_relu)
logits = tf.layers.dense(inputs=hidden2,units=1)
output = tf.sigmoid(logits)

return logits
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset