koraykv / unsup

Some unsupervised learning modules using Torch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error when run the demo

fqhlxw520 opened this issue · comments

When I run the demo demo_psd.lua, it error occur like that:
torch-qlua: demo_psd.lua:73: attempt to index global 'kex' (a nil value)
stack traceback:
[C]: ?
demo_psd.lua:73: in main chunk

Then I install kex and add require 'kex' to the code. Still errors. Here is the error message:
torch-qlua: /usr/local/share/lua/5.1/torch/init.lua:54: class nn.SpatialFullConvolution has been already assigned a parent class

stack traceback:
[C]: ?
[C]: in function 'newmetatable'
/usr/local/share/lua/5.1/torch/init.lua:54: in function 'class'
...r/local/share/lua/5.1/kex/SpatialFullConvolution.lua:1: in main chunk
[C]: in function 'dofile'
/usr/local/share/lua/5.1/torch/init.lua:34: in function 'include'
/usr/local/share/lua/5.1/kex/init.lua:7: in main chunk
[C]: in function 'require'
demo_psd.lua:1: in main chunk

How can I solve it?

Hi, please try by commenting out the kex.nnhacks() line and let me know if it works fine.

commented

Had the same problem with the revision that I checked out just now.
Uncommenting the kex.nnhacks() line makes the code run.

I don't know if this is still a problem. But unsup package does not depend on kex anymore. Actually installing kex should make things crash, because kex defines some classes that are already defined. I pushed a change where I commented out the kex.nnhacks() line.