DenseRelationalCaptioning icon indicating copy to clipboard operation
DenseRelationalCaptioning copied to clipboard

Cannot process images using run_model.lua

Open ruddradev opened this issue 4 years ago • 1 comments
trafficstars

Hello,

We need some help to understand what the below issue might mean. We are on Ubuntu 18.04, NVIDIA Driver 418, CUDA 10.1. We were able to install all dependencies except Torch7 from the specified links. For Torch7, we used a third party repository that made some changes to make it work with CUDA 10. After running the script

th run_model.lua -input_image 60.jpg

we get -

th run_model.lua -input_image 60.jpg -gpu -1 -use_cudnn -1
Warning: cudnn.convert does not work with nngraph yet. Ignoring nn.gModule1/1 processing image 60.jpg	
/home/ruddra/torch/install/bin/luajit: /home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 4 module of nn.Sequential:
In 1 module of nn.Sequential:
In 2 module of nn.ParallelTable:
In 1 module of nn.Sequential:
/home/ruddra/torch/install/share/lua/5.1/nn/Linear.lua:66: invalid arguments: FloatTensor number FloatTensor number CudaTensor FloatTensor 
expected arguments: *FloatTensor~2D* [FloatTensor~2D] [float] FloatTensor~2D FloatTensor~2D | *FloatTensor~2D* float [FloatTensor~2D] float FloatTensor~2D FloatTensor~2D
stack traceback:
	[C]: in function 'addmm'
	/home/ruddra/torch/install/share/lua/5.1/nn/Linear.lua:66: in function </home/ruddra/torch/install/share/lua/5.1/nn/Linear.lua:53>
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	/home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:41>
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	.../ruddra/torch/install/share/lua/5.1/nn/ParallelTable.lua:12: in function <.../ruddra/torch/install/share/lua/5.1/nn/ParallelTable.lua:10>
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	...
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	/home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	./densecap/DenseCapModel.lua:237: in function 'forward'
	./densecap/DenseCapModel.lua:281: in function 'forward_test'
	run_model.lua:62: in function 'run_image'
	run_model.lua:149: in main chunk
	[C]: in function 'dofile'
	...ddra/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x55f24f1f4570

WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.
stack traceback:
	[C]: in function 'error'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
	/home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	./densecap/DenseCapModel.lua:237: in function 'forward'
	./densecap/DenseCapModel.lua:281: in function 'forward_test'
	run_model.lua:62: in function 'run_image'
	run_model.lua:149: in main chunk
	[C]: in function 'dofile'
	...ddra/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x55f24f1f4570

Attached image that we are running with 60

ruddradev avatar Mar 17 '21 11:03 ruddradev

image Do you know this solution?

alice-cool avatar Aug 06 '21 06:08 alice-cool