<p dir="auto">The code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="graph_def = tf.GraphDef()
graph_def.ParseFromString(open(PB_PATH).read())"><pre class="notranslate"><code class="notranslate">graph_def = tf.GraphDef()
graph_def.ParseFromString(open(PB_PATH).read())
</code></pre></div>
<p dir="auto">The error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="google.protobuf.message.DecodeError: Error parsing message"><pre class="notranslate"><code class="notranslate">google.protobuf.message.DecodeError: Error parsing message
</code></pre></div>
<p dir="auto">The SHA: <code class="notranslate">f2a42d48a885ce8956c3ea69ef900cf484a6e873</code></p>
<p dir="auto">Thanks.</p>
<p dir="auto">I just upgraded TF to <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/469b3ddb4bb914a02f496748dd4ee5dbcbd7fce0/hovercard" href="https://github.com/tensorflow/tensorflow/commit/469b3ddb4bb914a02f496748dd4ee5dbcbd7fce0"><tt>469b3dd</tt></a> and I'm now getting an error importing the inception v3 model provided at <a href="https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip" rel="nofollow">https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip</a></p>
<p dir="auto">I didn't have this problem before the upgrade. Here is the error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;test.py&quot;, line 7, in &lt;module&gt;
    graph_def.ParseFromString(fileContent)
google.protobuf.message.DecodeError: Error parsing message"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "test.py", line 7, in &lt;module&gt;
    graph_def.ParseFromString(fileContent)
google.protobuf.message.DecodeError: Error parsing message
</code></pre></div>
<p dir="auto">And this is the code I'm using</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf

with open(&quot;tensorflow_inception_graph.pb&quot;, mode='rb') as f:
  fileContent = f.read()
graph_def = tf.GraphDef()
graph_def.ParseFromString(fileContent)

input_layer = tf.placeholder(&quot;float&quot;, [1, 299, 299, 3])
tf.import_graph_def(graph_def, input_map={ &quot;Mul&quot;: input_layer })"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>

<span class="pl-k">with</span> <span class="pl-en">open</span>(<span class="pl-s">"tensorflow_inception_graph.pb"</span>, <span class="pl-s1">mode</span><span class="pl-c1">=</span><span class="pl-s">'rb'</span>) <span class="pl-k">as</span> <span class="pl-s1">f</span>:
  <span class="pl-s1">fileContent</span> <span class="pl-c1">=</span> <span class="pl-s1">f</span>.<span class="pl-en">read</span>()
<span class="pl-s1">graph_def</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-v">GraphDef</span>()
<span class="pl-s1">graph_def</span>.<span class="pl-v">ParseFromString</span>(<span class="pl-s1">fileContent</span>)

<span class="pl-s1">input_layer</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s">"float"</span>, [<span class="pl-c1">1</span>, <span class="pl-c1">299</span>, <span class="pl-c1">299</span>, <span class="pl-c1">3</span>])
<span class="pl-s1">tf</span>.<span class="pl-en">import_graph_def</span>(<span class="pl-s1">graph_def</span>, <span class="pl-s1">input_map</span><span class="pl-c1">=</span>{ <span class="pl-s">"Mul"</span>: <span class="pl-s1">input_layer</span> })</pre></div>