unography / Tensorflow-Examples

Some example code using Tensorflow
72 stars 51 forks source link

google.protobuf.message.DecodeError: Truncated message #2

Open zxzhijia opened 8 years ago

zxzhijia commented 8 years ago

Thank you for your sharing first. I tried to run your code on my computer and load my .pb and .txt files. it gives me error: pi@raspberrypi:~/robotimages $ python retrain_example.py Traceback (most recent call last): File "retrain_example.py", line 86, in run_inference_on_image() File "retrain_example.py", line 63, in run_inference_on_image create_graph() File "retrain_example.py", line 49, in create_graph graph_def.ParseFromString(f.read()) File "/usr/local/lib/python2.7/dist-packages/google/protobuf/message.py", line 185, in ParseFromString self.MergeFromString(serialized) File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/python_message.py", line 1091, in MergeFromString if self._InternalParse(serialized, 0, length) != length: File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/python_message.py", line 1127, in InternalParse pos = field_decoder(buffer, new_pos, end, self, field_dict) File "/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/decoder.py", line 610, in DecodeRepeatedField raise _DecodeError('Truncated message.') google.protobuf.message.DecodeError: Truncated message.

MyadaRoshdi commented 6 years ago

i have the same problem trying to use ParseFromString() ,

raise _DecodeError('Truncated message.') google.protobuf.message.DecodeError: Truncated message.