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

Text encoder in 'no_grad' block? #7

Open
MIDIconsortium opened this issue Jan 25, 2022 · 2 comments
Open

Text encoder in 'no_grad' block? #7

MIDIconsortium opened this issue Jan 25, 2022 · 2 comments

Comments

@MIDIconsortium
Copy link

Hi, nice work with the repo!

Just wondering why it is the text encoder is wrapped in a 'with torch.no_grad()' block?

Thanks,

David

@daeing
Copy link

daeing commented Aug 2, 2022

Hi, nice work with the repo!

Just wondering why it is the text encoder is wrapped in a 'with torch.no_grad()' block?

Thanks,

David

Did you continue this work? Text encoder was freeze six layers, and linear wrapped in a 'with torch.no_grad()' block. loss may not get so low under this setting, but the image encoder learned goog representation. This is my exprement. I tried setting freeze layer None and delete with torch.no_grad(), the loss go down quickly, but the image encoder was not so robust.

@ultysim
Copy link

ultysim commented Jun 20, 2023

Also wondering why the FC head following the text embeddings are wrapped. Is it to prevent 'double counting' perhaps of error as we still consider the image half?

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