-
Notifications
You must be signed in to change notification settings - Fork 158
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
Conditional embedding #30
Comments
Please read the paper "CLASSIFIER-FREE DIFFUSION GUIDANCE". The label 0 refers to the model without conditions. The labels 1 to 10 refer to the CIFAR10 labels. The paper says: "Instead of training a separate classifier model, we choose to train an unconditional denoising diffusion model pθ(z) parameterized through a score estimator θ(zλ) together with the conditional model pθ(z|c) parameterized through θ(zλ, c)." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When doing conditional generation, the CIFAR10 labels (index from 0 to 9) need to be embedding into a latent space with the same dimension as time embedding. When read your code, I noticed the following line:
nn.Embedding(num_embeddings=num_labels + 1, embedding_dim=d_model, padding_idx=0)
Why the num_embeddings set to be num_labels + 1, and the padding is for what kind of purpose?
Thanks in advance.
The text was updated successfully, but these errors were encountered: