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

invalid parent class name nn.Decorator #419

Open
Sarah20187 opened this issue Jun 14, 2017 · 6 comments
Open

invalid parent class name nn.Decorator #419

Sarah20187 opened this issue Jun 14, 2017 · 6 comments

Comments

@Sarah20187
Copy link

After I installed rnn following the instrument, I had the error here:

/home/mata/torch/install/bin/luajit: /home/mata/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mata/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mata/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mata/torch/install/share/lua/5.1/torch/init.lua:102: bad argument #2 (invalid parent class name nn.Decorator)
stack traceback:
[C]: in function 'error'
/home/mata/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
train_residual.lua:12: in main chunk
[C]: in function 'dofile'
...ehua/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670

@JoostvDoorn
Copy link
Contributor

You should update the nn module, try reinstalling torch or install a new version of nn:

luarocks install nn

@Sarah20187
Copy link
Author

@JoostvDoorn Thank you for your suggestion. Finally I solved this problem by Element-Research/dpnn#91

@tastyminerals
Copy link
Contributor

@zhFuECL please don't forget close this.

@idansc
Copy link

idansc commented Aug 6, 2017

I followed dpnn#91 instructions, and I still get the same error while including rnn library, @zhFuECL can you please elaborate how you solved it?

@tastyminerals
Copy link
Contributor

@idansc please refer to @pranas solution Element-Research/dpnn#91:

Our solution was to force install previous version of dpnn like so:

git clone https://github.com/Element-Research/dpnn.git && \
  cd dpnn && \
  git reset --hard ca0e99fa6d0dfd971f0f284520562765ae0865fd && \
  luarocks make rocks/dpnn-scm-1.rockspec

@idansc
Copy link

idansc commented Aug 6, 2017

@tastyminerals Thanks! Actually I solved it by installing latest torch, nn and dpnn. Probably torch is now using the newer version of nn.

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

4 participants