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

LeakyReLU after Conv or WScale? #1

Closed
taoari opened this issue Nov 30, 2017 · 2 comments
Closed

LeakyReLU after Conv or WScale? #1

taoari opened this issue Nov 30, 2017 · 2 comments

Comments

@taoari
Copy link

taoari commented Nov 30, 2017

From https://github.com/ptrblck/prog_gans_pytorch_inference/blob/master/network.py#L470, LeakyReLU is inserted after Conv. However, from https://github.com/ptrblck/prog_gans_pytorch_inference/blob/master/model.py#L52, LeakyReLU is inserted after WScale layer. So should LeakyReLU be inserted after Conv or WScale? You have checked the output in the transfer_weights.py script, did I miss something?

BTW, do you also have the script for the discriminator network? I am trying to implement the training of the "Progressive Growing of GANs" paper in PyTorch based on your script. Looking forward to hearing back from you.

@ptrblck
Copy link
Owner

ptrblck commented Nov 30, 2017

You are mostly right, but have a look at the behavior of the WScale layer: https://github.com/ptrblck/prog_gans_pytorch_inference/blob/master/network.py#L292
It is basically "stealing" the nonlinearity from its incoming layer und resets it to linear, if the incoming layer has a nonlinearity set.

That's why I just placed the LeakyReLU after the WScale layer, since all Conv layer in the Lasagne net have a LeakyReLU set.

Unfortunately, I don't have the discriminator code, but I would love to implement it in the next iteration.
Have you already started implementing it?

@taoari
Copy link
Author

taoari commented Dec 1, 2017

@ptrblck Thank you! I have the base code for GAN training, and start to figure output the discriminator code.

@ptrblck ptrblck closed this as completed Dec 22, 2017
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

2 participants