Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't evaluate pretrained model #85

Open
mees opened this issue Oct 11, 2018 · 2 comments
Open

Can't evaluate pretrained model #85

mees opened this issue Oct 11, 2018 · 2 comments

Comments

@mees
Copy link

mees commented Oct 11, 2018

Hi, when I try to evaluate the pretrained model with 'th evaluate_model.lua 'I get following error:

/home/meeso/torch/install/bin/luajit: /home/meeso/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 3 module of nn.Sequential:
/home/meeso/torch/install/share/lua/5.1/nn/THNN.lua:110: bad argument #8 to 'v' (cannot convert 'nil' to 'int64_t')
stack traceback:
	[C]: in function 'v'
	/home/meeso/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'ClassNLLCriterion_updateOutput'
	...eso/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:41: in function 'updateOutput'
	./densecap/modules/OurCrossEntropyCriterion.lua:19: in function 'forward'
	./densecap/LocalizationLayer.lua:466: in function 'f'
	./densecap/LocalizationLayer.lua:228: in function 'timeit'
	./densecap/LocalizationLayer.lua:455: in function <./densecap/LocalizationLayer.lua:383>
	[C]: in function 'xpcall'
	/home/meeso/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	/home/meeso/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	./densecap/DenseCapModel.lua:255: in function 'forward'
	./densecap/DenseCapModel.lua:411: in function 'forward_backward'
	./eval/eval_utils.lua:62: in function 'eval_split'
	evaluate_model.lua:64: in main chunk
	[C]: in function 'dofile'
	...eeso/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00406670

Any idea how to solve it?

@doiken23
Copy link

doiken23 commented Apr 15, 2021

Did you solve it? I have the same problem.

@doiken23
Copy link

@mees

I solved the problem by commenting out lines 39,58,59,78,79,80,81.
Maybe the calculation of the loss is not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants