When I ran 'th main.lua', an error happened:
/root/torch/install/bin/luajit: invalid element (not a number) at /root/torch/pkg/torch/generic/Tensor.c:143 stack traceback: [C]: at 0x7f43dfefb1a0 [C]: in function 'ByteTensor' ./data.lua:101: in function 'get' ...tall/share/lua/5.1/torchnet/dataset/transformdataset.lua:112: in function 'get' ./data.lua:159: in function 'extractEachTarget' main.lua:165: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50
After I modify line 101 of data.lua like this:
target = torch.ByteTensor(loadedFile.label[idx]),
the error just goes away.
And here is the hyperlink to download the mnist dataset I use.
I'm wondering if the error is due to the dataset file I use. I would really appreciate it if you could help me with that. Thanks a lot!
When I ran 'th main.lua', an error happened:
/root/torch/install/bin/luajit: invalid element (not a number) at /root/torch/pkg/torch/generic/Tensor.c:143 stack traceback: [C]: at 0x7f43dfefb1a0 [C]: in function 'ByteTensor' ./data.lua:101: in function 'get' ...tall/share/lua/5.1/torchnet/dataset/transformdataset.lua:112: in function 'get' ./data.lua:159: in function 'extractEachTarget' main.lua:165: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50
After I modify line 101 of data.lua like this:target = torch.ByteTensor(loadedFile.label[idx])
, the error just goes away. And here is the hyperlink to download the mnist dataset I use. I'm wondering if the error is due to the dataset file I use. I would really appreciate it if you could help me with that. Thanks a lot!