weixmath / view-GCN

Pytorch code for view-GCN (CVPR2020)
77 stars 17 forks source link

Error during training on 12 view dataset #13

Open piseabhijeet opened 3 years ago

piseabhijeet commented 3 years ago

Hi @weixmath

I am trying to train the model on a custom dataset with 4 classes and 12 views. I am getting the below error: image

Stage 1 training goes fine but the error comes in stage 2 where my batch size is: train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=20, shuffle=False, num_workers=0) val_loader = torch.utils.data.DataLoader(val_dataset, batch_size=15, shuffle=False, num_workers=0)

I have changed the classes and the output tensor in the necessary places too . I am using Tesla V100 32GB GPU for training. Could you please help?

piseabhijeet commented 3 years ago

Hi @weixmath

Can you explain how the numbers are derived from line 62 below - Trainer.py: image

I am guessing it is calculated for 20 views and 40 classes. Can we derive for 12 views and 4 classes?

Thanks

WEIGONGCUN-Yan commented 2 years ago

@piseabhijeet num_train_files: 12520 num_val_files: 2000 Traceback (most recent call last): File "/view-GCN-master/train.py", line 66, in trainer.train(30) File "\view-GCN-master\tools\Trainer.py", line 52, in train for i, data in enumerate(self.train_loader): File "D:\soft_ware\Anaconda3\envs\mvcnn\lib\site-packages\torch\utils\data\dataloader.py", line 819, in next return self._process_data(data) File "D:\soft_ware\Anaconda3\envs\mvcnn\lib\site-packages\torch\utils\data\dataloader.py", line 846, in _process_data data.reraise() File "D:\soft_ware\Anaconda3\envs\mvcnn\lib\site-packages\torch_utils.py", line 369, in reraise raise self.exc_type(msg) ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "D:\soft_ware\Anaconda3\envs\mvcnn\lib\site-packages\torch\utils\data_utils\worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "D:\soft_ware\Anaconda3\envs\mvcnn\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:\soft_ware\Anaconda3\envs\mvcnn\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "\view-GCN-master\tools\ImgDataset.py", line 112, in getitem class_id = self.classnames.index(class_name) ValueError: 'modelnet40v2png_ori4' is not in list

hi! How to resolve these two errors at run time? thanks

piseabhijeet commented 2 years ago

Hi @WEIGONGCUN-Yan

I had tried this repo almost an year ago. Unfortunately at this point of time, I do not have access to the resource nor the dataset which I had worked on. Apologies for the same.