Wednesday, April 29, 2015

Torch7 weird error and Google Search without a solution

The below is an error one gets when working with Torch7 from time to time:
/usr/local/bin/luajit: /usr/local/share/lua/5.1/nn/Tanh.lua:4: attempt to index field 'nn' (a nil value)
stack traceback:
 /usr/local/share/lua/5.1/nn/Tanh.lua:4: in function 'updateOutput'
 /usr/local/share/lua/5.1/nn/Sequential.lua:29: in function 'updateOutput'
 /usr/local/share/lua/5.1/nn/Sequential.lua:29: in function 'forward'
 main.lua:93: in function 'opfunc'
 /usr/local/share/lua/5.1/optim/sgd.lua:43: in function 'sgd'
 main.lua:117: in function 'train3'
 main.lua:142: in main chunk
 [C]: in function 'dofile'
 /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
 [C]: at 0x00406260
Reading a bit about similar errors(1) I've concluded that probably the type of Tensor is wrong. I work on torch.CudaTensor objects, why the problem? I've forgot to import the correct library:
require("cunn")

1 comment:

  1. I learn some new stuff from it too, thanks for sharing your information.
    the best carding forum

    ReplyDelete