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

Error: class nn.SpatialGlimpse has been already assigned a parent class #423

Closed
QaisarRajput opened this issue Oct 12, 2017 · 2 comments
Closed

Comments

@QaisarRajput
Copy link

Hi, i am having this issue when i am trying to execute the "Recurrent-Visual-Attention". Following is the command i am running

ubuntuml@ubuntu:~/rnn-master$ th examples/recurrent-visual-attention.lua --useDevice 2 --rho 7 --rewardScale 1 --maxEpoch 2000 --maxTries 200 --learningRate 0.01 --sensorDepth 1 --momentum 0.9 --maxOutNorm -1 --batchSize 20 --saturateEpoch 800 --locatorStd 0.11 --uniform 0.1 --hiddenSize '{256}' --unitPixels 13 --glimpsePatchSize 8

Error output

/home/ubuntuml/torch/install/bin/luajit: /home/ubuntuml/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntuml/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntuml/torch/install/share/lua/5.1/torch/init.lua:102: class nn.SpatialGlimpse has been already assigned a parent class

stack traceback:
	[C]: in function 'error'
	/home/ubuntuml/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
	examples/recurrent-visual-attention.lua:2: in main chunk
	[C]: in function 'dofile'
	...tuml/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00406670

Following is the package detail:


Installed rocks:
----------------

argcheck
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

cwrap
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

dok
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

dp
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

dpnn
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

env
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

gnuplot
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

graph
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

image
   1.1.alpha-0 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

lua-cjson
   2.1devel-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

luaffi
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

luafilesystem
   1.6.3-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

moses
   1.6.1-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

nn
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

nngraph
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

nnx
   0.1-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

optim
   1.0.5-0 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

paths
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

penlight
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

qtlua
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

qttorch
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

rnn
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

sundown
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

sys
   1.1-0 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

threads
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

torch
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

torchx
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

trepl
   scm-1 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

xlua
   1.0-0 (installed) - /home/ubuntuml/torch/install/lib/luarocks/rocks

I looked into other issues. there was some issues with rnn , nn version issues. but the latest comments suggest that now version must not be a problem

@XDUSPONGE
Copy link

Hi, I have the same problem, have u solved it

@QaisarRajput
Copy link
Author

@XDUSPONGE Yes. if the error you are receiving is the same. make sure you have the libraries dp, nn, dpnn, torchx installed with luarocks install

After that the what you need to do is, to install rnn package but unlike other packages do not install it like luarocks install rnn (apparently there is some version issue)

But install like this
luarocks install rocks/rnn-scm-1.rockspec

Hope this solves your problem. do let us know here

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