ry / tensorflow-vgg16

conversation of caffe vgg16 model to tensorflow
672 stars 285 forks source link

Unable to parse the model #11

Open firstprayer opened 7 years ago

firstprayer commented 7 years ago

I downloaded the result (cuz I don't wanna install Caffe) and tried to read it in code with:

with open(FLAGS.model_path, 'rb') as f:
  graph_def = tf.GraphDef()
  graph_def.ParseFromString(f.read())

And I got

Traceback (most recent call last):
  File "synthesis.py", line 131, in <module>
    main()
  File "synthesis.py", line 56, in main
    X = load_vgg16() #load_inception()
  File "synthesis.py", line 35, in load_vgg16
    graph_def.ParseFromString(s)
  File "/Users/taiyuanz/tensorflow/lib/python2.7/site-packages/google/protobuf/message.py", line 185, in ParseFromString
    self.MergeFromString(serialized)
  File "/Users/taiyuanz/tensorflow/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 1090, in MergeFromString
    raise message_mod.DecodeError('Unexpected end-group tag.')
google.protobuf.message.DecodeError: Unexpected end-group tag.

I don't see anything particularly wrong so I can only guess it was due to incompatibility of protobuf versions. Can you help take a look?

kemusa commented 7 years ago

Are there any updates on this? I am currently facing this issue.