Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search Sign up Reseting focus

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphDef ParseFromString error #13746

formath opened this issue Oct 16, 2017 · 3 comments

GraphDef ParseFromString error #13746

formath opened this issue Oct 16, 2017 · 3 comments

Comments

Contributor formath commented Oct 16, 2017 •

I load a graph.pb saved by tf.train.write_graph(sess.graph.as_graph_def(), FLAGS.model_dir, 'graph.pb', as_text=False) via blow code. But an error occur. Why?

graph_def = graph_pb2.GraphDef() with tf.gfile.GFile('./graph.pb', 'rb') as f: graph_def.ParseFromString(f.read()) 
File "../../python/graph_test.py", line 53, in freeze_graph graph_def.ParseFromString(f.read()) File "/Users/anaconda/lib/python3.6/site-packages/google/protobuf/message.py", line 185, in ParseFromString self.MergeFromString(serialized) File "/Users/anaconda/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1069, in MergeFromString if self._InternalParse(serialized, 0, length) != length: File "/Users/anaconda/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1095, in InternalParse new_pos = local_SkipField(buffer, new_pos, end, tag_bytes) File "/Users/anaconda/lib/python3.6/site-packages/google/protobuf/internal/decoder.py", line 850, in SkipField return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, end) File "/Users/anaconda/lib/python3.6/site-packages/google/protobuf/internal/decoder.py", line 820, in _RaiseInvalidWireType raise _DecodeError('Tag had invalid wire type.') google.protobuf.message.DecodeError: Tag had invalid wire type. 

The text was updated successfully, but these errors were encountered: