RuntimeError:在 DataLoader 工作进程 3 中捕获 RuntimeError
我在尝试在单个 GPU 上训练模型时遇到了这个问题;我检查了张量形状,它的大小调整得很好
RuntimeError: Caught RuntimeError in DataLoader worker process 3.
Original Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\new\lib\site-packages\torch\utils\data\_utils\worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "C:\ProgramData\Anaconda3\envs\new\lib\site-packages\torch\utils\data\_utils\fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "c:\users\anaszafar\desktop\train\detectron2\detectron2\data\common.py", line 201, in __iter__
yield self.dataset[idx]
File "c:\users\anaszafar\desktop\train\detectron2\detectron2\data\common.py", line 90, in __getitem__
data = self._map_func(self._dataset[cur_idx])
File "c:\users\anaszafar\desktop\train\adelaidet\adet\data\fcpose_dataset_mapper.py", line 62, in __call__
raise
RuntimeError: No active exception to reraise
def __call__(self, dataset_dict):
for i in range(100):
dataset_dict_temp = copy.deepcopy(dataset_dict)
dataset_dict_temp = super().__call__(dataset_dict_temp)
if len(dataset_dict_temp["instances"]) != 0:
if self.is_train:
dataset_dict_temp['instances'] = self.HeatmapGenerator(dataset_dict_temp['instances'],
self.gt_heatmap_stride)
return dataset_dict_temp
raise
I am having this issue while trying to train my model on a single GPU; I checked the tensors shape it is resizing fine
RuntimeError: Caught RuntimeError in DataLoader worker process 3.
Original Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\new\lib\site-packages\torch\utils\data\_utils\worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "C:\ProgramData\Anaconda3\envs\new\lib\site-packages\torch\utils\data\_utils\fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "c:\users\anaszafar\desktop\train\detectron2\detectron2\data\common.py", line 201, in __iter__
yield self.dataset[idx]
File "c:\users\anaszafar\desktop\train\detectron2\detectron2\data\common.py", line 90, in __getitem__
data = self._map_func(self._dataset[cur_idx])
File "c:\users\anaszafar\desktop\train\adelaidet\adet\data\fcpose_dataset_mapper.py", line 62, in __call__
raise
RuntimeError: No active exception to reraise
def __call__(self, dataset_dict):
for i in range(100):
dataset_dict_temp = copy.deepcopy(dataset_dict)
dataset_dict_temp = super().__call__(dataset_dict_temp)
if len(dataset_dict_temp["instances"]) != 0:
if self.is_train:
dataset_dict_temp['instances'] = self.HeatmapGenerator(dataset_dict_temp['instances'],
self.gt_heatmap_stride)
return dataset_dict_temp
raise
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您的代码抛出了异常,但没有有意义的错误消息。查看函数
__call__
中第 62 行附近的c:\users\anaszafar\desktop\train\adelaidet\adet\data\fcpose_dataset_mapper.py
中的代码,看看为什么你的数据集代码决定引发
一个非特定错误。It seems like your code throws an exception without a meaningful error message. Look at the code in
c:\users\anaszafar\desktop\train\adelaidet\adet\data\fcpose_dataset_mapper.py
around line 62 in the function__call__
and see why your dataset code decided toraise
an unspecific error.