harvardnlp / im2markup

Neural model for converting Image-to-Markup (by Yuntian Deng yuntiandeng.com)
https://im2markup.yuntiandeng.com
MIT License
1.21k stars 214 forks source link

error when test the big dataset #20

Closed qiangruoyu closed 5 years ago

qiangruoyu commented 5 years ago

when i use the model test the dataset that is big,I meet an error.How to deal with it? /root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/cutorch/Tensor.lua:14: cuda runtime error (59) : device-side assert triggered at /root/torch/extra/cutorch/lib/THC/generic/THCTensorCopy.c:18 stack traceback: [C]: in function 'copy' /root/torch/install/share/lua/5.1/cutorch/Tensor.lua:14: in function 'localize' src/model/model.lua:598: in function 'feval' src/model/model.lua:885: in function 'step' src/train.lua:116: in function 'train' src/train.lua:300: in function 'main' src/train.lua:306: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50

qiangruoyu commented 5 years ago

The reason for the problem is a picture, but I didn't find anything special about it.

da03 commented 5 years ago

Weird. Is that picture from our provided dataset im2latex-100k?

qiangruoyu commented 5 years ago

Weird. Is that picture from our provided dataset im2latex-100k?

no,the picture is from my dataset .

da03 commented 5 years ago

Hmm I think there might be some format issue here. Probably you need to convert it to a grayscale image first.

qiangruoyu commented 5 years ago

Hmm I think there might be some format issue here. Probably you need to convert it to a grayscale image first.

I've done this step.

qiangruoyu commented 5 years ago

Hmm I think there might be some format issue here. Probably you need to convert it to a grayscale image first.

Could it be that the index is out of bounds?The size of the picture is (143,61)

da03 commented 5 years ago

Interesting. That size is small, yet I think it should suffice to get a non-zero feature map size after those pooling layers...

qiangruoyu commented 5 years ago

Interesting. That size is small, yet I think it should suffice to get a non-zero feature map size after those pooling layers...

Author , do you have the code that use pytorch?

Miffyli commented 5 years ago

@qiangruoyu

See this project (linked by @da03 in an another issue): https://github.com/OpenNMT/OpenNMT-py/blob/master/docs/source/im2text.md