Closed jKhurana closed 7 years ago
You are not passing anything to nn.identity()()
so x
ends up being nil
. The error message is pretty straight forward..
I am only creating model here, not doing training. Once I will call forward() method on module, I will pass the input to the module. Is it not similar to the "A network with containers" section of the following link: https://github.com/torch/nngraph
Hmm, shouldn't you be requiring nngraph
instead of nn
?
I didn't understand your last comment. I am new to torch. I just create the graph and convert it into module by gModule() method. I am following the above link. Is there anything that I am missing here ?
Try replacing
require 'nn'
with
require 'nngraph'
I am creating an encoder. Below is my code:
When I run the above code it gives the following error:
lua: .../jkhurana/torch/install/share/lua/5.2/nn/LookupTable.lua:59: attempt to index local 'input' (a nil value)
StackTrace: