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's the meaning of inject_int and thres_int? #19

Open
Ksky001 opened this issue Dec 23, 2019 · 1 comment
Open

What's the meaning of inject_int and thres_int? #19

Ksky001 opened this issue Dec 23, 2019 · 1 comment

Comments

@Ksky001
Copy link

Ksky001 commented Dec 23, 2019

why use extra attr_a_ and attr_b_ for attr_a and attr_b?

@elvisyjlin
Copy link
Owner

The decoder of the generator takes a latent space tensor and a conditional attribute as its inputs. The attributes in CelebA dataset are 0 and 1. But we surmise that it would be better to have symmetric inputs like what we usually do to the images for GANs. We always normalize an images to (-1, 1) when doing the generative stuffs.

This line att_a_ = (att_a * 2 - 1) * thres_int has the same effect. The thres_int is the threshold intensity playing a role of a scaling factor. It is 0.5 by default. So the attributes, which are 0s and 1s, are hence normalized as (-0.5, 0.5).

Please let me know if you have any other questions.

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