Created
April 28, 2018 12:37
-
-
Save nogawanogawa/bd20f1f0340b811c8422bca1470f2d98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Discriminator | |
def discriminator(inputdisc, name="discriminator", reuse=None): | |
if reuse: | |
scope.reuse_variables() | |
with tf.variable_scope(name): | |
f = 4 | |
x = conv2d(inputdisc, ndf, f, f, 2, 2, 0.02, "SAME", "c1", do_norm=False, relufactor=0.2) | |
x = conv2d(x, ndf*2, f, f, 2, 2, 0.02, "SAME", "c2", relufactor=0.2) | |
x = conv2d(x, ndf*4, f, f, 2, 2, 0.02, "SAME", "c3", relufactor=0.2) | |
x = conv2d(x, ndf*8, f, f, 1, 1, 0.02, "SAME", "c4",relufactor=0.2) | |
x = conv2d(x, 1, f, f, 1, 1, 0.02, "SAME", "c5",do_norm=False,do_relu=False) | |
return x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment