andreasveit / triplet-network-pytorch

370 stars 95 forks source link

BrokenPipeError:[Errno 32] Broken pipe. #2

Open mjchen611 opened 7 years ago

mjchen611 commented 7 years ago

Hi, I use Pytorch to run a triplet network(GPU), but when I got data , there was always a error: BrokenPipeError:[Errno 32] Broken pipe.

I thought it may be something wrong in the following codes:

for batch_idx, (data1, data2, data3) in enumerate(test_loader): if args.cuda: data1, data2, data3 = data1.cuda(), data2.cuda(), data3.cuda() data1, data2, data3 = Variable(data1), Variable(data2), Variable(data3)

Can you give me some suggestions? Thank you so much.

mjchen611 commented 7 years ago

And I use it in Windows8.1 with Cuda

rafis commented 5 years ago

Change to num_workers from 1 to 0 in kwargs of torch.utils.data.DataLoader to see the real error. The real error probably could be RuntimeError: CUDNN_STATUS_ARCH_MISMATCH - this do mean that you have an old graphics card with CUDA Compute Capability less than 3.0, but cudNN works only with 3.0+. If you don't want to buy new graphics card (personally I hate NVidia for being milking machine) look into the methods of transfer learning and use some pre-trained features.