def linear_discriminator(x, hidden_size, scope='Discriminator', reuse=False):
with tf.variable_scope(scope, reuse=reuse):
h0 = tf.tanh(layers.linear(x, hidden_size * 2))
h1 = tf.tanh(layers.linear(h0, hidden_size * 2))
h2 = tf.tanh(layers.linear(h1, hidden_size * 2))
return tf.sigmoid(layers.linear(h2, 1))
评论列表
文章目录