torch / torch7

http://torch.ch
Other
9k stars 2.38k forks source link

torch.cat triggers luajit "stack overflow" #1015

Open tastyminerals opened 7 years ago

tastyminerals commented 7 years ago

I have a table of Tensors tensor_tab: {200000 x IntTensor - size: 10}. I want to convert it into a Tensor of Tensors like the following:

torch.cat(tensor_tab,2):t()

Error:

/home/tastyminerals/torch/install/bin/luajit: stack overflow
stack traceback:
    [C]: at 0x7facc8df97f0
    [C]: in function 'cat'

However, when I do it via loop, everything works:

  local data_tensor = torch.IntTensor(#data,10)
  for i=1,#data do data_tensor[i] = data[i] end

Result:

{
  1 : IntTensor - size: 179056x10
}
killa1218 commented 7 years ago

The same problem with you.