How do i read the datas from the file train.pb in current c++ code? I followed some tutorial on tensorflow and understood till this much lines, but after this i cant find exact correct way to read the datas(multidimensional array values) inside the c++ code. i'm studked in my project cas of this.
Session* session;
Status status = NewSession(SessionOptions(), &session);
if (!status.ok()) {
std::cout << status.ToString() << "\n";
return 1;
}
// Read in the protobuf graph we exported
// (The path seems to be relative to the cwd. Keep this in mind
// when using `bazel run` since the cwd isn't where you call
// `bazel run` but from inside a temp folder.)
GraphDef graph_def;
status = ReadBinaryProto(Env::Default(), "models/train.pb", &graph_def);
if (!status.ok()) {
std::cout << status.ToString() << "\n";
return 1;
}
// Add the graph to the session
status = session->Create(graph_def);
if (!status.ok()) {
std::cout << status.ToString() << "\n";
return 1;
}
std::vector<std::pair<string, tensorflow::Tensor>> inputs = " what is here?"