-
Notifications
You must be signed in to change notification settings - Fork 48
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
FacT-Finetuning SAM #680
FacT-Finetuning SAM #680
Conversation
…n script to include lora functionality
@@ -79,6 +122,10 @@ def __init__( | |||
|
|||
assert rank > 0 | |||
|
|||
dim = model.image_encoder.blocks[0].attn.qkv.in_features | |||
self.FacTu = nn.Linear(dim, rank, bias=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anwai98 Do we need to add a condition here, so that these parameters are only initialized when FacT is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we definitely cannot hard-code them in the current location, would create a bit of a mess. While reviewing, Ill try to see how we can make it flexible upon the peft module.
I'll close this PR in favor of moving it to #682. |
Implementation of FacT Finetuning method on SAM. @anwai98