I am running Tensorflow using its C++ API.
I have the following call that returns four tensors in finalOutput:
std::string str1 = "detection_boxes";
std::string str2 = "detection_scores";
std::string str3 = "detection_classes";
std::string str4 = "num_detections";
std::vector<Tensor> finalOutput;
status = session->Run({ {InputName, inputTensor} }, { str1, str2, str3, str4 }, {}, &finalOutput);
std::cout << finalOutput[0].DebugString() << std::endl;
The print statement outputs the following:
"Tensor< type: float shape: [1,100,4] values: [[0.00710274419 0.766219556 0.0347728245]]...>"
Now that I have a Tensor with 100 elements and each element has 4 values, how can I iterate through the elements and values?
It seems like I have to call a function to return a Eigen::TensorMap then somehow access the elements. I am just not sure quite how to do that.
Thank you very much for your help!