clip-pytorch icon indicating copy to clipboard operation
clip-pytorch copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: 'datasets/flickr8k-images\\3361411074_83f27d2a1c.jpg' Epoch 1/100: 0%| | 0/750 [00:00<?, ?it/s<class 'dict'>]

Open Dehuan2022 opened this issue 1 year ago • 1 comments

路径错误,但数据集是按要求下载解压好的,不知道哪出了问题,大佬能不能指点一下,谢谢 1

Dehuan2022 avatar Mar 01 '24 07:03 Dehuan2022

解决了, 在 utils/dataloader.py _ def__getitem__(self, index) {...; image_path = os.path.join(self.datasets_path, photo_name)}这一句 ;改为 os.path.join(self.datasets_path, photo_name).replace("\","/"); 就好了,,不知道是不是编译器的问题,把路径里面的双反斜杠 改成单斜杠就好了。

Dehuan2022 avatar Mar 01 '24 08:03 Dehuan2022