Thanks for the quick response.
You are right, when the input dimension is an array or 1D vector, there is a overloaded version of torch::tensor that easily creates a tensor from them. But, the problem is that there is not any version of torch::tensor for getting a 2D, 3D, or 4D vector as the input. If you try something like:
std::vector<std::vector<int>> input_2d;
for (int i = 0 ; i <5; i++)
    input_2d.push_back(input_1d);

torch::Tensor state_from_vector_2d = torch::tensor(input_2d);

you get No matching function for call to 'tensor' error.
Any suggestion?