Stack tensor data to batch

Hello all,
i couldn’t really find any good resource on what is the best way to stack my 3D tensor data into a batch which i can feed into my model.forward() .
Currently what i got from the tutorials is a
std::vector<torch::jit::IValue> inputs;
When i push_back my tensors into the vector and pass it directly into the forward function it interprets the number of elements as input arguments which is not what i want.
How can i concat my tensors into a given batch size?
I also found torch::cat() but i need a dynamic way to stack the data tensors into batches.