trashnet icon indicating copy to clipboard operation
trashnet copied to clipboard

I run th train.lua, but met this error:

Open bemoregt opened this issue 8 years ago • 7 comments

HI, @garythung

I run th train.lua, but met this error:

17:47:34 weightDecay = 0.025 17:47:34 learningRate = 1.25e-05 17:47:34 Starting training for 100 epochs /tmp/luarocks_cunn-scm-1-4893/cunn/lib/THCUNN/ClassNLLCriterion.cu:57: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [7,0,0] Assertion t >= 0 && t < n_classes failed. /tmp/luarocks_cunn-scm-1-4893/cunn/lib/THCUNN/ClassNLLCriterion.cu:57: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [27,0,0] Assertion t >= 0 && t < n_classes failed. THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-9564/cutorch/lib/THC/generic/THCStorage.c line=32 error=59 : device-side assert triggered /home/ctilab/torch/install/bin/luajit: cuda runtime error (59) : device-side assert triggered at /tmp/luarocks_cutorch-scm-1-9564/cutorch/lib/THC/generic/THCStorage.c:32 stack traceback:

What's wrong with me?

My CUDA & Luarocks Package install is allright, may be..

bemoregt avatar Jul 25 '17 08:07 bemoregt

@bemoregt did you solve it?? did u get the output??

skgdeepak avatar Oct 23 '17 09:10 skgdeepak

@garythung please reply why this error is occuring

skgdeepak avatar Oct 23 '17 09:10 skgdeepak

Hey guys, I don't work on this anymore so I won't be of too much assistance.

The error seems to be because of the number of classes (my fault). Try -numClasses 6 when you run the training, that should fix it.

garythung avatar Oct 25 '17 03:10 garythung

Thanks a lot ~

bemoregt avatar Oct 25 '17 06:10 bemoregt

Did it fix the error?

garythung avatar Oct 25 '17 16:10 garythung

No. Please send the full command to run train.lua

skgdeepak avatar Oct 25 '17 17:10 skgdeepak

Try th train.lua -numClasses 6

garythung avatar Oct 26 '17 02:10 garythung