invalid parent class name nn.Decorator
iacolippo opened this issue · comments
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?
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.
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
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
.
require "nn.Decorator"
before require "dpnn"
then it can work, but I do not know where is wrong.