Open YY-MyWorld opened 2 years ago
The code should run under Linux, maybe you are running it under Windows. You need to change class_name = path.split('/')[-3]
to class_name = path.split('/')[-2]
in __getitem__
method under ImgDataset.py.
Excuse me again, I try to modify in windows environment class_name = path.split('/')[-3] to class_name = path.split('/')[-2] 。But the problem still exists, does it have to be run under linux?Looking forward to your reply
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年7月19日(星期二) 上午8:44 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [jongchyisu/mvcnn_pytorch] ValueError: 'modelnet40_images_new_12x' is not in list (Issue #32)
The code should run under Linux, maybe you are running it under Windows. You need to change class_name = path.split('/')[-3] to class_name = path.split('/')[-2] in getitem method under ImgDataset.py.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
D:\python\anaconda\python.exe D:/_多媒体检索/mvcnn_pytorch-master/train_mvcnn.py WARNING: summary folder already exists!! It will be overwritten!! WARNING: summary folder already exists!! It will be overwritten!! num_train_files: 118116 num_val_files: 29616 Traceback (most recent call last): File "D:/_多媒体检索/mvcnn_pytorch-master/train_mvcnn.py", line 61, in
trainer.train(30)
File "D:_多媒体检索\mvcnn_pytorch-master\tools\Trainer.py", line 50, in train
for i, data in enumerate(self.train_loader):
File "D:\python\anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 363, in next
data = self._next_data()
File "D:\python\anaconda\lib\site-packages\torch\utils\data\dataloader.py", line 403, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\python\anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\python\anaconda\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:_多媒体检索\mvcnn_pytorch-master\tools\ImgDataset.py", line 127, in getitem
class_id = self.classnames.index(class_name)
ValueError: 'modelnet40_images_new_12x' is not in list
Process finished with exit code 1