qiaoguan / Person-reid-GAN-pytorch

A Pytorch Implementation of "Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro"(ICCV17)
158 stars 49 forks source link

run error in LSROloss(nn.Module): #20

Open SpiritBear000 opened 5 years ago

SpiritBear000 commented 5 years ago

when i run train_baseline.py

2018-11-23 20-35-58

########## error log ############

Traceback (most recent call last): File "/Person-reid-GAN-pytorch/train_baseline.py", line 371, in num_epochs=130) File "/Person-reid-GAN-pytorch/train_baseline.py", line 251, in train_model loss = criterion(outputs,labels,flags) File "/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/Person-reid-GAN-pytorch/train_baseline.py", line 178, in forward return loss.mean() RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THC/generated/../THCReduceAll.cuh:339 /pytorch/aten/src/THC/THCTensorScatterGather.cu:97: void THCudaTensor_gatherKernel(TensorInfo<Real, IndexType>, TensorInfo<Real, IndexType>, TensorInfo<long, IndexType>, int, IndexType) [with IndexType = unsigned int, Real = float, Dims = 2]: block: [0,0,0], thread: [10,0,0] Assertion indexValue >= 0 && indexValue < src.sizes[dim] failed. /pytorch/aten/src/THC/THCTensorScatterGather.cu:97: void THCudaTensor_gatherKernel(TensorInfo<Real, IndexType>, TensorInfo<Real, IndexType>, TensorInfo<long, IndexType>, int, IndexType) [with IndexType = unsigned int, Real = float, Dims = 2]: block: [0,0,0], thread: [13,0,0] Assertion indexValue >= 0 && indexValue < src.sizes[dim] failed.

PratikKulkar commented 3 years ago

Hey, did you got the solution I am also facing the same issue while training GAN!