Skip to content
New issue

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

Enum type "caffe.V1LayerParameter.LayerType" has no value named "DATA". #9

Closed
ternaus opened this issue Jul 2, 2016 · 1 comment
Closed

Comments

@ternaus
Copy link

ternaus commented Jul 2, 2016

Caffe model: http://vision.princeton.edu/pvt/GoogLeNet/ImageNet/

Error:

Traceback (most recent call last):
File "caffe2keras.py", line 45, in
main(args)
File "caffe2keras.py", line 34, in main
model = convert.caffe_to_keras(args.load_path+'/'+args.prototxt, args.load_path+'/'+args.caffemodel, debug=args.debug)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/Keras-1.0.5-py2.7.egg/keras/caffe/convert.py", line 29, in caffe_to_keras
google.protobuf.text_format.Merge(prototext, config)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 265, in Merge
return MergeLines(text.split('\n'), message)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 298, in MergeLines
_ParseOrMerge(lines, message, True)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 229, in _ParseOrMerge
_MergeField(tokenizer, message, allow_multiple_scalars)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 382, in _MergeField
_MergeField(tokenizer, sub_message, allow_multiple_scalars)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 384, in _MergeField
_MergeScalarField(tokenizer, message, field, allow_multiple_scalars)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 434, in _MergeScalarField
value = tokenizer.ConsumeEnum(field)
File "/home/vladimir/packages/2/keras/keras2caffe/local/lib/python2.7/site-packages/google/protobuf/text_format.py", line 712, in ConsumeEnum
raise self._ParseError(str(e))
google.protobuf.text_format.ParseError: 4:9 : Enum type "caffe.V1LayerParameter.LayerType" has no value named "DATA".

@MarcBS
Copy link
Owner

MarcBS commented Jul 6, 2016

The model you are trying to convert is deprecated, it is a .prototxt V1, which is not supported by the converter. If you need a GoogleNet model you can use the one included here, which is the same.

If you definitely need to use a V1 prototxt file then you must manually change the syntax.

@MarcBS MarcBS closed this as completed Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants