Open TheLiao233 opened 1 day ago
We're sorry about the bugs due to a busy schedule and did not carefully check the uploaded code. We will soon update the repository to correct existing issues. Thanks again for your attention and the reminder about these problems.
Hello, thank you for your outstanding work and publishing the relevant code. I had some problems when I tried to use the command
python train.py --config configs/Retrieval_flickr_train.yaml --source_model ViT-B/16 --source_ckpt '/media/nlp/data/tl/model/vit'
to reproduce.The following error occurred when I set
os.environ["CUDA_VISIBLE_DEVICES"] = '0,1'
to runSo change
clamp_norm = torch.clamp(norm, self.min_norm, self.max_norm)
toclamp_norm = torch.clamp(norm, self.min_norm.to(norm.device), self.max_norm.to(norm.device))
But then the following problem occurred, so I removed the
self.method
from theloss_infoNCE = self.loss_func(adv_txt_embeds, img_embeds, txt2img, target_img_embeds, self.temperature,self.method)
Finally, I encountered the following problems, and then I tried to directly change
loss.backward()
toloss.backward(retain_graph=True)
, and finally the GPU memory overflowed, but no solution was found at present, I hope you can help me solve it, thank you very much!