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

CGAN convergence time #31

Open
oliverzhang42 opened this issue Sep 12, 2018 · 0 comments
Open

CGAN convergence time #31

oliverzhang42 opened this issue Sep 12, 2018 · 0 comments

Comments

@oliverzhang42
Copy link

oliverzhang42 commented Sep 12, 2018

I've noticed an inefficiency in the CGAN code. When we append the one-hot encoded labels to the image, they influence the training gradients a lot. Instead, I've noticed that scaling the one-hot encoded labels down by a factor of 0.01 or even 0.001 helps the CGAN converge around twice as fast.

That would mean changing opts.py's conv_cond_concat function. My hack was to change return concat([x, y*tf.ones([x_shapes[0], x_shapes[1], x_shapes[2], y_shapes[3]])], 3) to return concat([x, 0.001*y*tf.ones([x_shapes[0], x_shapes[1], x_shapes[2], y_shapes[3]])], 3) and that worked well for me. I'm not too sure about in general though, perhaps try adding batch norm?

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