qiaoguan / Person-reid-GAN-pytorch

A Pytorch Implementation of "Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro"(ICCV17)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run error in LSROloss(nn.Module):

SpiritBear000 opened this issue · comments

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.

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