crnn icon indicating copy to clipboard operation
crnn copied to clipboard

errors with my own mdb datasets

Open avr248 opened this issue 7 years ago • 5 comments

/disk1/deeplearning/torch/install/bin/luajit: bad argument #3 to '?' (torch.*Tensor expected, got nil) stack traceback: [C]: at 0x7f900fc2f8b0 [C]: in function '__newindex' ./utilities.lua:33: in function 'str2label' ./DatasetLmdb.lua:82: in function 'allImageLabel' ./training.lua:84: in function 'trainModel' main_train.lua:51: in main chunk [C]: in function 'dofile' ...ning/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x004064d0

anyone can help me how to fix the errors?

thanks

avr248 avatar Jul 20 '16 07:07 avr248

i think it is because in your data there is characters that not in the ascii range of the net... look it str2label and see which letters are included in the net, i think is A-Z a-z 0-9 you can add more if you want or you can delete from your data the word with the additional characters

oneOfThePeople avatar Aug 04 '16 12:08 oneOfThePeople

@oneOfThePeople @avr248 I am getting the same error. How can I resolve this?

rayush7 avatar Apr 23 '17 05:04 rayush7

How did you fix this problem? I get something similar:

 /root/torch/install/bin/luajit: bad argument #2 to '?' (out of range at /root/torch/pkg/torch/generic     
 /Tensor.c:700)
		stack traceback:
			[C]: at 0x7f434cae18f0
			[C]: in function '__newindex'
			./utilities.lua:66: in function 'str2label'
			./DatasetLmdb.lua:116: in function 'nextBatch'
			./training.lua:90: in function 'trainModel'
			main_train.lua:51: in main chunk
			[C]: in function 'dofile'
			/root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
			[C]: at 0x00406670

I changed the config.lua file to reflect the number of classes in my new dataset, but the error still remains. After a few hundred iterations, it breaks out of training with this error.

stalagmite7 avatar Aug 14 '17 23:08 stalagmite7

There is a non ascii character in your dataset. i also encountered the same problem. Before encoding the dataset in the Lmdb format. Make sure that you don't have any other characters beside a-z, A-Z,0-9, White space and tabs also generates errors. you can find this by printing the ascii in str2label function

HidayatRahman avatar Sep 29 '17 12:09 HidayatRahman

@stalagmite7 hello,I met the same peoblem /root/torch/install/bin/luajit: bad argument #2 to '?' (out of range at /root/torch/pkg/torch/generic
/Tensor.c:700) stack traceback: [C]: at 0x7f434cae18f0 [C]: in function '__newindex' ./utilities.lua:66: in function 'str2label' ./DatasetLmdb.lua:116: in function 'nextBatch' ./training.lua:90: in function 'trainModel' main_train.lua:51: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670 have you solved it?

guohao1995 avatar Jul 26 '19 07:07 guohao1995