haotian-liu / LLaVA

[NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.

Home Page:https://llava.hliu.cc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to update the gradient of vit?

Lin-Tianwei opened this issue · comments

Question

When I set vit's attribute requires_grad to True, when loss performs gradient backpass, vit's grad is still None. I think this is because the function truncates the gradient postback when organizing text and images as input. Can someone tell me how to update the gradient of vit? Thank you!