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 #91

Open
iacolippo opened this issue May 12, 2017 · 4 comments
Open

invalid parent class name nn.Decorator #91

iacolippo opened this issue May 12, 2017 · 4 comments

Comments

@iacolippo
Copy link

iacolippo commented May 12, 2017

Hi, I'm getting this error when requiring dpnn:

/home/lighton/torch/install/share/lua/5.1/trepl/init.lua:389: 

/home/lighton/torch/install/share/lua/5.1/trepl/init.lua:389: 

/home/lighton/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/lighton/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
	[string "_RESULT={require 'dpnn'}"]:1: in main chunk
	[C]: in function 'xpcall'
	/home/lighton/torch/install/share/lua/5.1/trepl/init.lua:661: in function 'repl'
	...hton/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk
	[C]: at 0x00405d50

I tried

luarocks remove dpnn
luarocks install dpnn

But I still get it. May be related to this?

@pranas
Copy link

pranas commented May 12, 2017

Yeah, we are seeing the same problem. It must be related to #90 since our builds started failing just after it was merged. It seems nn update should solve the problem, looking into it.

@iacolippo
Copy link
Author

iacolippo commented May 13, 2017

Problem still present if installing torch following instructions at torch.ch and then installing dpnn. Solved by doing after that:

luarocks install torch
luarocks install nn
luarocks install dpnn

@pranas
Copy link

pranas commented May 14, 2017

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

I think we will stick with this until official Torch install starts using newer version of nn.

@hfxunlp
Copy link

hfxunlp commented May 18, 2017

require "nn.Decorator" before require "dpnn" then it can work, but I do not know where is wrong.

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

3 participants