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

what are shortcut_layers and inject_layers in generator layer #28

Open
Sepideh-Rezaeirad opened this issue Dec 3, 2020 · 2 comments
Open

Comments

@Sepideh-Rezaeirad
Copy link

Hi,

Many thanks for providing your code publicly.
Could you please explain what are shortcut_layers and inject_layers in generator?

Thank you.

@elvisyjlin
Copy link
Owner

Briefly speaking, shortcut layers pass the information from encoder layers to decoder layers. Since the AttGAN generator, which is composed of an encoder and a decoder, is a U-Net structure, the corresponding layers in the encoder and the decoder has the same dimension and information can be passed between them.

Injection layers, on the other hand, inform the intermediate layers of the decoder about the target attributes. Traditional condition GAN's generator gets the target attributes at the beginning layer. The information will somehow lose when they fly through the whole network. Telling intermediate decoder layers target attributes encourage they to translate the image toward the them.

If you'd like to read more, please refer to the paper.

@daizigege
Copy link

daizigege commented Dec 1, 2021

1、but why you contact 1024 with 512(1024+512=1536), not contact 512 with 512(512+512=1024).. Don't their dimensions need to be commen?

2、And you set injection layers equal to 0, is that to say it get a good performance and attrubute information doesn`t lose ?

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

3 participants