{"action":"created","issue":{"url":"https://api.github.com/repos/OpenNMT/Im2Text/issues/6","repository_url":"https://api.github.com/repos/OpenNMT/Im2Text","labels_url":"https://api.github.com/repos/OpenNMT/Im2Text/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/OpenNMT/Im2Text/issues/6/comments","events_url":"https://api.github.com/repos/OpenNMT/Im2Text/issues/6/events","html_url":"https://github.com/OpenNMT/Im2Text/issues/6","id":198208816,"number":6,"title":"error: cannot convert 'struct THCudaLongTensor *' to 'struct THCudaTensor *'","user":{"login":"fracting","id":194342,"avatar_url":"https://avatars.githubusercontent.com/u/194342?v=3","gravatar_id":"","url":"https://api.github.com/users/fracting","html_url":"https://github.com/fracting","followers_url":"https://api.github.com/users/fracting/followers","following_url":"https://api.github.com/users/fracting/following{/other_user}","gists_url":"https://api.github.com/users/fracting/gists{/gist_id}","starred_url":"https://api.github.com/users/fracting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fracting/subscriptions","organizations_url":"https://api.github.com/users/fracting/orgs","repos_url":"https://api.github.com/users/fracting/repos","events_url":"https://api.github.com/users/fracting/events{/privacy}","received_events_url":"https://api.github.com/users/fracting/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-31T00:27:52Z","updated_at":"2016-12-31T00:33:56Z","closed_at":null,"body":"Hi,\r\n\r\nI downloaded the pre-trained model from http://lstm.seas.harvard.edu/latex/model_latest but I get an error when testing:\r\n\r\n```\r\n~/Im2Text$ th src/train.lua -phase test -gpu_id 1 -load_model -model_dir model_pretrained -image_dir data/images -data_path data/test.txt -output_dir results -batch_size 2 -beam_size 5 -max_num_tokens 500 -max_image_width 800 -max_image_height 800\r\n[12/31/16 00:11:57 INFO] Command Line Arguments: -phase test -gpu_id 1 -load_model -model_dir model_pretrained -image_dir data/images -data_path data/test.txt -output_dir results -batch_size 2 -beam_size 5 -max_num_tokens 500 -max_image_width 800 -max_image_height 800\t\r\n[12/31/16 00:11:57 INFO] Using CUDA on GPU 1\t\r\n[12/31/16 00:11:57 INFO] Building model\t\r\n[12/31/16 00:11:57 INFO] Loading model from /home/ubuntu/Im2Text/model_pretrained/model_latest\t\r\n[12/31/16 00:11:58 INFO] decoderNumHidden: 512\t\r\n[12/31/16 00:11:58 INFO] decoderNumLayers: 1\t\r\n[12/31/16 00:11:58 INFO] batchSize: 2\t\r\n[12/31/16 00:11:58 INFO] inputFeed: true\t\r\n[12/31/16 00:11:58 INFO] maxDecoderLength: 501\t\r\n[12/31/16 00:11:58 INFO] maxEncoderLengthWidth: 100\t\r\n[12/31/16 00:11:58 INFO] maxEncoderLengthHeight: 100\t\r\n[12/31/16 00:11:58 INFO] encoderNumLayers: 1\t\r\n[12/31/16 00:11:58 INFO] cnnFeatureSize: 512\t\r\n[12/31/16 00:11:58 INFO] targetEmbeddingSize: 80\t\r\n[12/31/16 00:11:58 INFO] encoderNumHidden: 256\t\r\n[12/31/16 00:11:58 INFO] targetVocabSize: 503\t\r\n[12/31/16 00:11:59 INFO] Number of parameters: 9527335\t\r\n[12/31/16 00:11:59 INFO] Preparing memory optimization...\t\r\n/home/ubuntu/torch/install/bin/luajit: /home/ubuntu/.luarocks/share/lua/5.1/nn/THNN.lua:110: bad argument #3 to 'v' (cannot convert 'struct THCudaLongTensor *' to 'struct THCudaTensor *')\r\nstack traceback:\r\n\t[C]: in function 'v'\r\n\t/home/ubuntu/.luarocks/share/lua/5.1/nn/THNN.lua:110: in function 'ClassNLLCriterion_updateOutput'\r\n\t.../ubuntu/.luarocks/share/lua/5.1/nn/ClassNLLCriterion.lua:44: in function 'updateOutput'\r\n\t.../ubuntu/.luarocks/share/lua/5.1/nn/ParallelCriterion.lua:23: in function 'forward'\r\n\t.../ubuntu/.luarocks/share/lua/5.1/onmt/modules/Decoder.lua:335: in function 'backward'\r\n\t./src/model.lua:516: in function '_optimizeMemory'\r\n\t./src/model.lua:162: in function '_build'\r\n\t./src/model.lua:73: in function 'load'\r\n\tsrc/train.lua:206: in function 'main'\r\n\tsrc/train.lua:255: in main chunk\r\n\t[C]: in function 'dofile'\r\n\t...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk\r\n\t[C]: at 0x00406670\r\n```\r\nIm2Text source is latest version, OpenNMT is latest binary package from luarocks. Did I do anything wrong? Any hints are great appreciated!"},"comment":{"url":"https://api.github.com/repos/OpenNMT/Im2Text/issues/comments/269839223","html_url":"https://github.com/OpenNMT/Im2Text/issues/6#issuecomment-269839223","issue_url":"https://api.github.com/repos/OpenNMT/Im2Text/issues/6","id":269839223,"user":{"login":"da03","id":5753959,"avatar_url":"https://avatars.githubusercontent.com/u/5753959?v=3","gravatar_id":"","url":"https://api.github.com/users/da03","html_url":"https://github.com/da03","followers_url":"https://api.github.com/users/da03/followers","following_url":"https://api.github.com/users/da03/following{/other_user}","gists_url":"https://api.github.com/users/da03/gists{/gist_id}","starred_url":"https://api.github.com/users/da03/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da03/subscriptions","organizations_url":"https://api.github.com/users/da03/orgs","repos_url":"https://api.github.com/users/da03/repos","events_url":"https://api.github.com/users/da03/events{/privacy}","received_events_url":"https://api.github.com/users/da03/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T00:33:56Z","updated_at":"2016-12-31T00:33:56Z","body":"Hmm I think something might be wrong with your `cunn` or `cutorch` packages, can you try reinstalling that? `luarocks install --local cunn` `luarocks install --local cutorch`"}}
{"actor":{"display_login":"da03"}}