Skip to content

How to only fine-tune the image encoder? #403

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

Closed
GA-17a opened this issue Nov 17, 2023 · 3 comments
Closed

How to only fine-tune the image encoder? #403

GA-17a opened this issue Nov 17, 2023 · 3 comments

Comments

@GA-17a
Copy link

GA-17a commented Nov 17, 2023

When I want to feed only the parameters of the image encoder (self.model.encode_image.parameters()) into the optimizer, it shows that "AttributeError: 'function' object has no attribute 'parameters'". It's ok for "self.model.parameters()".

Anyone knows how to solve this problem?

@Danny-1-8
Copy link

man,cause that's a function not A module,try with the "self.model.visual"

@GA-17a GA-17a closed this as completed Nov 27, 2023
@GA-17a
Copy link
Author

GA-17a commented Nov 27, 2023

man,cause that's a function not A module,try with the "self.model.visual"
It has been solved in the same way, thank you.

@GA-17a GA-17a reopened this Nov 27, 2023
@GA-17a GA-17a closed this as completed Nov 27, 2023
@Dinosaurcubs
Copy link

When I want to feed only the parameters of the image encoder (self.model.encode_image.parameters()) into the optimizer, it shows that "AttributeError: 'function' object has no attribute 'parameters'". It's ok for "self.model.parameters()".

Anyone knows how to solve this problem?

I met the same question,bro. Could u please help me about the solution you took

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