kaishengtai / torch-ntm

A Neural Turing Machine implementation in Torch.
279 stars 55 forks source link

Error: class nn.Normalize has been already assigned a parent class #8

Closed inexxt closed 8 years ago

inexxt commented 8 years ago

When I try to get the copy.lua task working, the following error appears:

/home/jack/torch/install/bin/luajit: /home/jack/torch/install/share/lua/5.1/torch/init.lua:102: class nn.Normalize has been already assigned a parent class

stack traceback:
        [C]: in function 'newmetatable'
        /home/jack/torch/install/share/lua/5.1/torch/init.lua:102: in function 'class'
        /home/jack/Neurons/torch-ntm/layers/Normalize.lua:7: in main chunk
        [C]: in function 'dofile'
        /home/jack/torch/install/share/lua/5.1/torch/init.lua:49: in function 'include'
        /home/jack/Neurons/torch-ntm/init.lua:9: in main chunk
        [C]: in function 'require'
        tasks/copy.lua:11: in main chunk
        [C]: in function 'dofile'
        ...jack/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:133: in main chunk
        [C]: at 0x00405ea0

I've tried to run it with lua5.1 and 5.2 with the same result. I've also tried to run it on fresh docker container - same effect (all systems were ubuntu).

soumith commented 8 years ago

this repo needs to be updated. The nn package now has its own Normalize, and this package's Normalize is trying to overwrite it.

kaishengtai commented 8 years ago

This is fixed now.