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

Incorporating labels in ACGAN: Does torch.mul() have the same effect as concatenation and adding as additional channels? #3

Open
ghost opened this issue Jan 5, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2022

Hi, first of all, thanks for your amazing work!

I have a question regarding a difference between your implementation and a recommendation from the repository "ganhacks" that you referred to. In their repository they state to use an embedding layer for labels, and add as additional channels to images when implementing the conditional gan. I have often seen this done by concatenating the embedding and the noise vectors. However, in your code you use a multiplication, as below;

label_embedding = self.embedding(label)
x = torch.mul(noise,label_embedding)
x = x.view(-1,100,1,1)

Is this the same as the concatenation and if not, what is the difference and would you prefer one over the other?

Thank you in advance!

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

0 participants