Not sure, but it does seem more idiomatic to me if you just want to convert the type from list of lists to 2D tensor. If data is a list of tensor types, then torch.cat would be the way to go, and if it’s a list of lists, then torch.cat will probably not work.