报错信息如下:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
经查,百度等发现需要在pytorch的torch.utils.data.DataLoader中,把参数num_workers(表示进程个数)改为0即可。