title: Cannot load protocol buffer with ReadBinaryProto Tensorflow
body: <p>I am having issues loading my protocol buffer file saved from a tensorflow model in C++. I can load and execute the .pb file in Python with no issues at all, however when trying to load it in C++ with the <code>ReadBinaryProto</code> function I get the error:</p>
  
  <pre><code>String field'tensorflow.MetaGraphDef.MetaInfoDef.tensorflow_version' 
     contains invalid UTF-8 data when parsing a protocol buffer. Use the 'bytes' 
     type if you intend to send raw bytes.
  
     Non-OK-status: LoadModel(session_inception, pathToGraph ) status: Data loss: 
     Can't parse E:/Projects/SampleTensorflow/tmp/latestmodel.pb as binary proto
  </code></pre>
  
  <p>I am using <strong>Tensorflow v1.10</strong> and a sample of the C++ code is posted below, I have tried many different methods to save the .pb file including using the freeze_graph method and the <code>tf.write_graph</code> method, neither seem to fix the issue.</p>
  
  <pre><code>  tensorflow::Status LoadModel(tensorflow::Session *sess, std::string 
    graph_fn, std::string checkpoint_fn = "") {
    tensorflow::Status status;
  
    std::string graph_fn = "E:/Projects/SampleTensorflow/tmp/latestmodel.pb";      
  
    // Read in the protobuf graph
    tensorflow::MetaGraphDef graph_def;
    status = ReadBinaryProto(tensorflow::Env::Default(), graph_fn, 
                              &amp;graph_def);
  
    if (status != tensorflow::Status::OK())
      return status;
  
    // Create the graph
    status = sess-&gt;Create(graph_def.graph_def());
    if (status != tensorflow::Status::OK())
        return status;
  </code></pre>
  
  <p>Thank you for any help!</p>