pytorch point源代码出现KeyError: Caught KeyError in DataLoader worker process 0.如何解决?

我使用的是https://github.com/fxia22/pointnet.pytorch
pointnet的源代码,运行train_classification.py后出现如下错误:

Traceback (most recent call last):
  File "D:/学习资料/博三/点云处理教程/pointnet/pointnet.pytorch/utils/train_classification.py", line 159, in <module>
    sys.exit(main())
  File "D:/学习资料/博三/点云处理教程/pointnet/pointnet.pytorch/utils/train_classification.py", line 110, in main
    for i, data in enumerate(dataloader, 0):
  File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 345, in __next__
    data = self._next_data()
  File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 856, in _next_data
    return self._process_data(data)
  File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 881, in _process_data
    data.reraise()
  File "D:\ANA\envs\pytorch\lib\site-packages\torch\_utils.py", line 395, in reraise
    raise self.exc_type(msg)
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "D:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\_utils\worker.py", line 178, in _worker_loop
    data = fetcher.fetch(index)
  File "D:\ANA\envs\pytorch\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:\ANA\envs\pytorch\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "D:\学习资料\博三\点云处理教程\pointnet\pointnet.pytorch\pointnet\dataset.py", line 170, in __getitem__
    cls = self.cat[fn.split('/')[0]]
KeyError: 'sofa_0457'

想知道如何解决这类问题,或者什么源代码比较好跑一些,被这个折磨很久了

查看全部
weixin_41496173
微凉的衣柜
2020/06/29 14:45
  • 机器学习
  • 深度学习
  • 人工智能
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复