eladhoffer / SemiSupContrast

Semi-supervised deep learning by metric embedding
19 stars 8 forks source link

Errors when running 'th main.lua' #1

Open jxqhhh opened 5 years ago

jxqhhh commented 5 years ago

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!

jxqhhh commented 5 years ago

Sorry that there is something wrong with the hyperlink I provided before. Maybe you could download it here mnsit.zip.