Yolo-FastestV2
Yolo-FastestV2 copied to clipboard
RuntimeError
训练时候,提示这个错误。 RuntimeError: Pin memory thread exited unexpectedly
请问解决了吗?
I got the same error
Initialize weights: model/backbone/backbone.pth Starting training for 10 epochs... Epoch:0 LR:0.000002 CIou:3.969100 Obj:62.182312 Cls:23.107639 Total:89.259048: 100%|██████████| 117/117 [00:16<00:00, 6.95it/s] 0%| | 0/117 [00:00<?, ?it/s]Exception in thread Thread-2: Traceback (most recent call last): File "C:\Users\ashwi\AppData\Local\Programs\Python\Python37\lib\threading.py", line 917, in _bootstrap_inner self.run() File "C:\Users\ashwi\AppData\Local\Programs\Python\Python37\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "C:\Users\ashwi\PycharmProjects\NeuralRenderer\venv\lib\site-packages\torch\utils\data_utils\pin_memory.py", line 28, in _pin_memory_loop idx, data = r ValueError: not enough values to unpack (expected 2, got 0)
0%| | 0/117 [00:05<?, ?it/s]
Traceback (most recent call last):
File "C:/Users/ashwi/PycharmProjects/Yolo-FastestV2/train.py", line 99, in
Process finished with exit code 1
明白了,我使用的是 Pytorch 1.7.1,所以他们在数据加载器中有问题 将 Pytorch 更新到最新版本以解决该问题
Got it, I was using Pytorch 1.7.1 so they have an issue with the dataloader Update Pytorch to the latest version to get rid of the issue