I want to concatenate several tensorflow::Tensor in one to use the session only once, I have a process that retrieve a tensor for each image filling the data with this code suggestion import-opencv-mat-into-c-tensorflow-without-copying
But I have i issues trying to merge all this tensors, and documentation for function concat is not clear about how to do it, by this moment my code looks like:
std::vector<tensorflow::Tensor> inputTensorVector;
for(cv::Mat image: images){
inputTensorVector.push_back(create_vector(image));
}
tensorflow::Tensor input(tensorflow::DT_FLOAT, tensorflow::TensorShape({ inputTensorVector.size(), 100, 100, 3 }));
create_vector is a function that creates a Tensor of shape (1,100,100,3) from the image that is passed as argument, the question is how to fill input tensor with each tensor from inputTensorVector?