pytorch训练 EOFERROR; bad file descriptor;多进程问题;DataLoader worker exited unexpectedly; num_worker > 0问
importtorch.multiprocessingtorch.multiprocessing.set_sharing_strategy('file_system')方法二把train放到main里面,例如if__name__=='__main__':train()方法三设置dataloader的num_workers