Lua: attempt to index field (a nil value)
<p>I'm trying to print out the values in the batch tensor in Test:run() from this code: <a href="https://github.com/zhangxiangxiao/Crepe/blob/master/train/test.lua" rel="nofollow">https://github.com/zhangxiangxiao/Crepe/blob/master/train/test.lua</a></p>

<p>I tried the following at the start of the for loop:</p>

<pre><code>print(ffi.string(torch.data(self.batch.content:narrow(1, self.batch[1][1][1], 1))))
</code></pre>

<p>but I get the following error:</p>

<pre><code>qlua: ./test.lua:63: attempt to index field 'content' (a nil value)
stack traceback:
        [C]: in function '__index'   
        ./test.lua:63: in function 'run'
        main.lua:145: in function 'run'
        main.lua:42: in function 'main'
        main.lua:316:in main chunk  
</code></pre>

<p>Batch's dimensions are 50x1014x69 and is type userdata, so I'm not sure why indexing 1,1,1 would be nil...</p>