The problem occurs when doing machine learning training.
Reason for the error: The problem is due to multi-threading under windows, and is related to the DataLoader class. Just change the number of num_workers to 0. This is a bug in windows.
The error code can be referred to:
trainLoader=torch.utils.data.DataLoader(trainSet,batch_size=Bach_Size,shuffle=True,num_workers=2)
testLoader=torch.utils.data.DataLoader(testSet,batch_size=Bach_Size,shuffle=True,num_workers=2)
Set The number of num_ workers to 0
trainLoader=torch.utils.data.DataLoader(trainSet,batch_size=Bach_Size,shuffle=True,num_workers=0)
testLoader=torch.utils.data.DataLoader(testSet,batch_size=Bach_Size,shuffle=True,num_workers=0)
Read More:
- [Solved] Pytorch Download CIFAR1 Datas Error: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certi
- [Solved] Python Error: An attempt has been made to start a new process before the current process has finished …
- [Solved] PyTorch Caught RuntimeError in DataLoader worker process 0和invalid argument 0: Sizes of tensors mus
- Mxnet.gluon Load Pre Training
- Error:output with shape [1, 224, 224] doesn‘t match the broadcast shape [3, 224, 224]
- [Solved] RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the
- Python: Panda scramble data
- Python RuntimeError: Expected 4-dimensional input for 4-dimensional weight [32, 1, 5, 5]
- Facenet validate_on_lfw.py Error AssertionError: The number of LFW images must be an integer multip
- Python: RNN principle realized by numpy
- Pytorch torch.cuda.FloatTensor Error: RuntimeError: one of the variables needed for gradient computation has…
- [Solved] torchsummary Error: RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.F
- Pytorch ValueError: Expected more than 1 value per channel when training, got input size [1, 768
- [Solved] RuntimeError: gather(): Expected dtype int64 for index
- [Solved] RuntimeError: Error(s) in loading state_dict for Net:
- [Solved] Model training Error: _pickle.PicklingError: Can’t pickle
- [Solved] pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource handle
- [Solved] RuntimeError : PyTorch was compiled without NumPy support
- Here is the difference and connection of Torch. View (), Transpose (), and Permute ()
- Python Error: certificate verify failed: certificate has expired