-
Notifications
You must be signed in to change notification settings - Fork 82
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
add label conditions problem #11
Comments
new_indices = torch.cat((sos_tokens, new_indices), dim=1) #new_indices:(b,257)
target = indices
logits, _ = self.transformer(new_indices[:, :-1]) Hello, I've read your code, and I'm wondering if For example, if it's a male who is 20 years old: new_indices = torch.cat((torch.tensor([0, 20]).unsqueeze(0).repeat(new_indices.size(0), 1), new_indices), dim=1) #new_indices:(b,258) And if it's a female who is 31: new_indices = torch.cat((torch.tensor([1, 31]).unsqueeze(0).repeat(new_indices.size(0), 1), new_indices), dim=1) #new_indices:(b,258) Is training like this sufficient to achieve the conditioning effect? |
In addition to computing the loss for logits and target, should we also add a discriminator to determine whether the generated image is male or female and estimate the age in years? Does this discriminator make sense? |
I think condition encoder should be trained to vector, then cat with encoder vector. |
Hello, your tutorial is great! I have a question I would like to ask: when I want to add label conditions, such as gender or age, or both, how should the transformer be adjusted, and could you provide an example?
The text was updated successfully, but these errors were encountered: