July 2019
Intermediate to advanced
512 pages
19h 39m
English
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
Read now
Unlock full access