Closed jpainam closed 6 years ago
do not need to take into account, just leave it alone
hello, i have a trouble when i run train_baseline.py as follow:
Traceback (most recent call last):
File "train_baseline.py", line 347, in
Hello, I have the same trouble, did anyone solve it?
/pytorch/torch/lib/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: [0,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [9,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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/torch/lib/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: [11,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [15,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [16,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [17,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [19,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [22,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [23,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [27,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. /pytorch/torch/lib/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: [30,0,0] Assertion
indexValue >= 0 && indexValue < src.sizes[dim]failed. THCudaCheck FAIL file=/pytorch/torch/lib/THC/generic/THCTensorScatterGather.cu line=66 error=59 : device-side assert triggered Traceback (most recent call last): File "/home/sobey123/.pycharm_helpers/pydev/pydevd.py", line 1664, in <module> main() File "/home/sobey123/.pycharm_helpers/pydev/pydevd.py", line 1658, in main globals = debugger.run(setup['file'], None, None, is_module) File "/home/sobey123/.pycharm_helpers/pydev/pydevd.py", line 1068, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/home/sobey123/code/project/Person-reid-GAN-pytorch/train_baseline.py", line 357, in <module> num_epochs=130) File "/home/sobey123/code/project/Person-reid-GAN-pytorch/train_baseline.py", line 254, in train_model loss = criterion(outputs, labels, flags) File "/home/sobey123/miniconda2/envs/ReID_GAN/lib/python2.7/site-packages/torch/nn/modules/module.py", line 357, in __call__ result = self.forward(*input, **kwargs) File "/home/sobey123/code/project/Person-reid-GAN-pytorch/train_baseline.py", line 174, in forward logpt = logpt.gather(1, target) # here is a problem RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/torch/lib/THC/generic/THCTensorScatterGather.cu:66
it seems the indexValue are out of bound, but I wonder index for what.
I solve it.
just modify the script changeIndex.py at line 20 adn 21 as follow
train_save_path = original_path + '/train_new' data_path = original_path + '/train'
and run the script.
yes, someone have issued this question before,just change the index of the label using changeIndex.py!
@ShiinaMitsuki the code you modified has returned at line 17 and 18 in changeIndex.py, weather your mean is take them at line 21?
@lufei92
here's the code of changeindex.py, I didnt see any return there.
https://github.com/qiaoguan/Person-reid-GAN-pytorch/blob/19924fad720d7bc409056d72a6a29ac05b5f64fb/train_baseline.py#L168
While reading your code, I saw this line of code, is it a comment to be taken into account? And what exactly is the problem? Thank