", line 1, in 赞 踩 Traceback (most recent call last): File "<ipython-input-48-37d70fab5553>", line 1, in <module> File "C:\anconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 880, in runfile File "C:\anconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile File "D:/Pytorch Learning/mofan_code/optimizer.py", line 65, in <module> File "C:\anconda3\lib\site-packages\torch\utils\data\dataloader.py", line 576, in __next__ File "C:\anconda3\lib\site-packages\torch\utils\data\dataloader.py", line 553, in _get_batch File "C:\anconda3\lib\site-packages\torch\utils\data\dataloader.py", line 519, in _try_get_batch RuntimeError: DataLoader worker (pid(s) 8524, 13912) exited unexpectedly 解决办法:num_workers=2, # subprocesses for loading data 注释子进程即可# num_workers=2 Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。
RuntimeError: DataLoader worker (pid(s) 13952, 14260) exited unexpectedly 解决办法_raise runtimeerror('dataloader worker (pid(s) {})
runfile('D:/Pytorch Learning/mofan_code/optimizer.py', wdir='D:/Pytorch Learning/mofan_code')
execfile(filename, namespace)
exec(compile(f.read(), filename, 'exec'), namespace)
for step, (batch_x, batch_y) in enumerate(loader):# for each training step
idx, batch = self._get_batch()
success, data = self._try_get_batch()
raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str))