31 tensorflow::GraphDef graph_def;
37 google::protobuf::io::IstreamInputStream is{ioconfig->in()};
39 if (!google::protobuf::TextFormat::Parse(&is, &graph_def))
41 std::cerr <<
"ERROR: Failed to parse prototxt" << std::endl;
45 google::protobuf::io::OstreamOutputStream os{ioconfig->out()};
46 google::protobuf::io::CodedOutputStream coded_os{&os};
48 if (!graph_def.SerializeToCodedStream(&coded_os))
50 std::cerr <<
"ERROR: Failed to serialize" << std::endl;