Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_gen_discriminator and patch_discriminator #12

Open
cuimiao187561 opened this issue Jan 7, 2018 · 0 comments
Open

build_gen_discriminator and patch_discriminator #12

cuimiao187561 opened this issue Jan 7, 2018 · 0 comments

Comments

@cuimiao187561
Copy link

hello hardikbansal
I am fuzzy on build_gen_discriminator and patch_discriminator. Can you tell me the difference between build_gen_discriminato and patch_discriminator ?

def build_gen_discriminator(inputdisc, name="discriminator"):

with tf.variable_scope(name):
    f = 4
    o_c1 = general_conv2d(inputdisc, ndf, f, f, 2, 2, 0.02, "SAME", "c1", do_norm=False, relufactor=0.2)
    o_c2 = general_conv2d(o_c1, ndf*2, f, f, 2, 2, 0.02, "SAME", "c2", relufactor=0.2)
    o_c3 = general_conv2d(o_c2, ndf*4, f, f, 2, 2, 0.02, "SAME", "c3", relufactor=0.2)
    o_c4 = general_conv2d(o_c3, ndf*8, f, f, 1, 1, 0.02, "SAME", "c4",relufactor=0.2)
    o_c5 = general_conv2d(o_c4, 1, f, f, 1, 1, 0.02, "SAME", "c5",do_norm=False,do_relu=False)

    return o_c5

def patch_discriminator(inputdisc, name="discriminator"):

with tf.variable_scope(name):
    f= 4

    patch_input = tf.random_crop(inputdisc,[1,70,70,3])
    o_c1 = general_conv2d(patch_input, ndf, f, f, 2, 2, 0.02, "SAME", "c1", do_norm="False", relufactor=0.2)
    o_c2 = general_conv2d(o_c1, ndf*2, f, f, 2, 2, 0.02, "SAME", "c2", relufactor=0.2)
    o_c3 = general_conv2d(o_c2, ndf*4, f, f, 2, 2, 0.02, "SAME", "c3", relufactor=0.2)
    o_c4 = general_conv2d(o_c3, ndf*8, f, f, 2, 2, 0.02, "SAME", "c4", relufactor=0.2)
    o_c5 = general_conv2d(o_c4, 1, f, f, 1, 1, 0.02, "SAME", "c5",do_norm=False,do_relu=False)

    return o_c5

thank you vey much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant