PubMedCLIP icon indicating copy to clipboard operation
PubMedCLIP copied to clipboard

Issue with VQA_RAD training and testing

Open wangpengyu-debug opened this issue 6 months ago • 0 comments

I use the data you mentioned in the issue #9 "Thanks for your report. I have been trying to fix this, but with every error getting fixed, sth else comes up! The problem is that the main QCR project (accessible at https://github.com/Awenbocc/med-vqa) does not provide the script for creating the dictionary, labels, etc input files. My scripts create_dictionary, create_labels, etc have been mainly developed and tested using the SLAKE dataset. But changing them to also support VQA-RAD seems to be not super straightforward.

So until I figure out a solution that supports both datasets, my suggestion for you is to use the already processed data that the QCR project provides available at https://github.com/Awenbocc/med-vqa/tree/master/data. This is the data that I also used for the rest of the pipeline when experimenting with VQA-RAD."

but still a error: File "main/main.py", line 85, in question_classify.load_state_dict(pretrained_model) File "/mnt/HDD5/pwan0442/anaconda3/envs/PubMedCLIP/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1223, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for classify_model: size mismatch for w_emb.emb.weight: copying a param with shape torch.Size([1178, 300]) from checkpoint, the shape in current model is torch.Size([1260, 300]).

image

wangpengyu-debug avatar Aug 13 '24 02:08 wangpengyu-debug