Element-Research / rnn

Recurrent Neural Network library for Torch7's nn
BSD 3-Clause "New" or "Revised" License
941 stars 313 forks source link

invalid parent class name nn.Decorator #419

Open Sarah20187 opened 7 years ago

Sarah20187 commented 7 years ago

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 commented 7 years ago

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

luarocks install nn
Sarah20187 commented 7 years ago

@JoostvDoorn Thank you for your suggestion. Finally I solved this problem by https://github.com/Element-Research/dpnn/issues/91

tastyminerals commented 7 years ago

@zhFuECL please don't forget close this.

idansc commented 7 years ago

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 commented 7 years ago

@idansc please refer to @pranas solution https://github.com/Element-Research/dpnn/issues/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 commented 7 years ago

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