-
Notifications
You must be signed in to change notification settings - Fork 639
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
codebook keeps getting trained during DALLE training #35
Comments
@CDitzel Good timing! I'm about to get back to work on DALL-E today and tomorrow, going to make the training easy for everyone :) https://github.com/lucidrains/DALLE-pytorch/releases/tag/0.0.54 I've released a new version where I turn off tying embeddings, and if they are turned on, I detach it properly so it doesn't get trained. Thanks for catching that! |
thank you for attending to this so quickly! Is a separate embedding for the text and the image tokens even necessary? I saw similar implementations where they would just concat the tokens and pass them over to a transformer that features only one single nn.Embedding |
yup you can do one single embedding! you would just need to offset one set of tokens by the number in the other i don't think it matters too much :) |
for now, let's keep it separate, so it could be optionally tied (or not) |
do you really? I believe one could just index into one and the same embeddings with indices of both modalities even though they span identical integer ranges |
@CDitzel ohh, well, i meant you would do something like then, when it comes time to retrieve the embedding |
yeah I understood what you meant. But I think just using
and then index into that with both tokens equally even though this means that every so often a text token and an image token could retrieve the same embedding vector |
DALLE-pytorch/dalle_pytorch/dalle_pytorch.py
Line 290 in 40f4119
right now, neighter an apropritate no_grad call nor manually disabling codebook.requires_grad_(False) prevents the pretrained VAE codebook from getting further adjusted during the subsequent DALLE training procedure.
I am in doube if this is meant to be the case.
Training of the VAE encoder part is rightfully disabled by the associated decorator
DALLE-pytorch/dalle_pytorch/dalle_pytorch.py
Line 122 in 40f4119
but this does not pertain to the codebook. Maybe I am missing something here? Just wanted to draw the attention to this point
The text was updated successfully, but these errors were encountered: