We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用的是macos系统。在运行过程中存在多进程报错的问题,应该在 trainloader = torch.utils.data.DataLoader(trainset, batch_size=4, shuffle=True, num_workers=0) 以及
testloader = torch.utils.data.DataLoader(testset, batch_size=4, shuffle=False, num_workers=0) 中设置进程数目为0 或者在训练的过程中使用if name=='main':将训练过程包起来。这样就可以正常运行不报错了。
多进程加载数据在windows系统中也不支持,在linux中可以。 转载自CSDN。 pytorch小白,欢迎交流
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用的是macos系统。在运行过程中存在多进程报错的问题,应该在
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4,
shuffle=True, num_workers=0)
以及
testloader = torch.utils.data.DataLoader(testset, batch_size=4,
shuffle=False, num_workers=0)
中设置进程数目为0
或者在训练的过程中使用if name=='main':将训练过程包起来。这样就可以正常运行不报错了。
多进程加载数据在windows系统中也不支持,在linux中可以。
转载自CSDN。
pytorch小白,欢迎交流
The text was updated successfully, but these errors were encountered: