RuntimeError: An attempt has been made to start a new process

RuntimeError: An attempt has been made to start a new process_第1张图片
原因:在linux系统中可以使用多个子进程加载数据,而在windows系统中不能。在windows系统中需要将进程数设置为单进程,所以我们需要将数据处理语句这部分的参数num_workers=2改为num_workers=0即可解决错误。
RuntimeError: An attempt has been made to start a new process_第2张图片

你可能感兴趣的:(ubuntu,深度学习)