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

THNN.lua:110: cuda runtime error (59) #17

Closed qiangruoyu closed 5 years ago

qiangruoyu commented 5 years ago

Dear Author: I meet an error When I test the model after I use the code "th src/train.lua -phase test -gpu_id 1 -load_model -model_dir model/html -visualize \ -data_base_dir data/html_64_64_100k/data/ \ -data_path data/html_64_64_100k/html_test.txt \ -label_path data/html_64_64_100k/html_sources.txt \ -output_dir results \ -max_num_tokens 400 -max_image_width 64 -max_image_height 64 \ -batch_size 80 -beam_size 5 "

And the Error message is:

HCudaCheck FAIL file=/root/torch/extra/cutorch/lib/THC/generated/../generic/THCTensorMathPointwise.cu line=157 error=59 : device-side assert triggered /root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/nn/THNN.lua:110: cuda runtime error (59) : device-side assert triggered at /root/torch/extra/cutorch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:157 stack traceback: [C]: in function 'v' /root/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'Sigmoid_updateOutput' /root/torch/install/share/lua/5.1/nn/Sigmoid.lua:4: in function 'func' /root/torch/install/share/lua/5.1/nngraph/gmodule.lua:345: in function 'neteval' /root/torch/install/share/lua/5.1/nngraph/gmodule.lua:380: in function 'forward' src/model/model.lua:370: in function 'feval' src/model/model.lua:912: in function 'step' src/train.lua:116: in function 'train' src/train.lua:299: in function 'main' src/train.lua:305: 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 Can you give me some advice?

da03 commented 5 years ago

Hmm weird, have you checked your torch installation? For example by

th -ltorch -e "torch.test()"

and

th -lnn    -e "nn.test()"
qiangruoyu commented 5 years ago

Hmm weird, have you checked your torch installation? For example by

th -ltorch -e "torch.test()"

and

th -lnn    -e "nn.test()"

I rebuilt the dictionary and I use the model that I train.it Succeed. thanks!

da03 commented 5 years ago

Great. Closing.