You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all thank you for your great work! After viewing the implementation of the model, I felt a bit of strange about the way you initialize the customized Q-Former module.
From the parts of code related to its initializaion below, I suspect that the Qformer_txt module here is only randomly initialized.
In init_Qformer_txt function above, only a BERT model with random weight is created, with no other functions to load any sort of pretrained checkpoints into it. Obviously self.load_from_pretrained function in Line 89 of evcap.py will only load the state_dict into model.Qformer from the original BLIP-2 checkpoint, leaving model.Qformer_txt in an uninitialized state.
Moreover, in the default setting the custom QFormer module is frozen except for the query tokens, which, in my view, means that the randomly initialized weights will persist during the entire training progress.
I think that in order for the module to carry out the retrieval task properly, some sort of pretrained BERT weight is required to be loaded into that module. (either it is bert-base-uncased or some sort of BLIP-2/InstructBLIP QFormer checkpoints) In your paper I found no description of any checkpoints used for this module.
I wonder if the random initialization setting here is caused by mistake or it is meant to work in this way, or if there are any sorts of weight copying mechanism that I overlooked in other parts of the code (in this case, I will give you my sincere apologies)
Hope to receive your reply soon.
The text was updated successfully, but these errors were encountered:
Hi, first of all thank you for your great work! After viewing the implementation of the model, I felt a bit of strange about the way you initialize the customized Q-Former module.
From the parts of code related to its initializaion below, I suspect that the
Qformer_txt
module here is only randomly initialized.EVCap/models/evcap.py
Lines 84 to 96 in 68bd158
EVCap/models/blip2.py
Lines 61 to 74 in 68bd158
In
init_Qformer_txt
function above, only a BERT model with random weight is created, with no other functions to load any sort of pretrained checkpoints into it. Obviouslyself.load_from_pretrained
function in Line 89 ofevcap.py
will only load the state_dict intomodel.Qformer
from the original BLIP-2 checkpoint, leavingmodel.Qformer_txt
in an uninitialized state.Moreover, in the default setting the custom QFormer module is frozen except for the query tokens, which, in my view, means that the randomly initialized weights will persist during the entire training progress.
I think that in order for the module to carry out the retrieval task properly, some sort of pretrained BERT weight is required to be loaded into that module. (either it is
bert-base-uncased
or some sort of BLIP-2/InstructBLIP QFormer checkpoints) In your paper I found no description of any checkpoints used for this module.I wonder if the random initialization setting here is caused by mistake or it is meant to work in this way, or if there are any sorts of weight copying mechanism that I overlooked in other parts of the code (in this case, I will give you my sincere apologies)
Hope to receive your reply soon.
The text was updated successfully, but these errors were encountered: