-
Notifications
You must be signed in to change notification settings - Fork 97
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
How to embed video encoder module from pytorch? #148
Comments
Need more detailed information... What do you mean by "embed video encoder module from pytorch"? |
Sorry! I already have a video encoder written in pytorch, how can I fully embed this module into the sat framework? |
Just replace the model with your pytorch module in fine-tuning script: (Because sat models are just normal pytorch modules)
One more thing, maybe you need to add a def disable_untrainable_params(self):
total_trainable = 0
enable = ['mlp']
for n, p in self.named_parameters():
flag = False
for e in enable:
if e.lower() in n.lower():
flag = True
break
if not flag:
p.requires_grad_(False)
else:
total_trainable += p.numel()
print_rank0(n)
print_rank0("***** Total trainable parameters: "+str(total_trainable)+" *****")
model.disable_untrainable_params = disable_untrainable_params |
No description provided.
The text was updated successfully, but these errors were encountered: