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

freeze CLIP TextEncoder #11

Closed
Ahnsun opened this issue Mar 2, 2022 · 2 comments
Closed

freeze CLIP TextEncoder #11

Ahnsun opened this issue Mar 2, 2022 · 2 comments

Comments

@Ahnsun
Copy link

Ahnsun commented Mar 2, 2022

Hi, the paper pointed out that we should freeze the text encoder of CLIP during training. I wonder how to achieve it and where is the corrresponding code. Thanks!

@Ahnsun Ahnsun changed the title free CLIP TextEncoder freeze CLIP TextEncoder Mar 2, 2022
@soskek
Copy link

soskek commented Mar 3, 2022

In my understanding (though I'm not an author), the optimizer selects which parameters to be updated.
https://github.com/isl-org/lang-seg/blob/main/modules/lsegmentation_module.py#L119-L175
Because these lines do not select CLIP parameters (self.net.clip_pretrained), they are frozen.

@Boyiliee
Copy link
Collaborator

Boyiliee commented Mar 6, 2022

Thanks @soskek for answering this!

Best wishes for your research! @Ahnsun

@Boyiliee Boyiliee closed this as completed Mar 6, 2022
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

3 participants