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

TypeError: Descriptors should not be created directly, but only retrieved from their parent. #174

Open
auyer opened this issue Jun 25, 2018 · 2 comments

Comments

@auyer
Copy link

auyer commented Jun 25, 2018

When trying to convert some of the pre-trained models provided by caffe, I received this error:

 $ python ../../caffe-tensorflow/convert.py hybridCNN_deploy.prototxt --caffemodel hybridCNN_iter_700000.caffemodel --data-output-path ../ --code-output-path ../
Traceback (most recent call last):
  File "../../caffe-tensorflow/convert.py", line 60, in <module>
    main()
  File "../../caffe-tensorflow/convert.py", line 56, in main
    args.phase)
  File "../../caffe-tensorflow/convert.py", line 27, in convert
    transformer = TensorFlowTransformer(def_path, caffemodel_path, phase=phase)
  File "/Users/auyer/python/caffe-tensorflow/kaffe/tensorflow/transformer.py", line 221, in __init__
    self.load(def_path, data_path, phase)
  File "/Users/auyer/python/caffe-tensorflow/kaffe/tensorflow/transformer.py", line 227, in load
    graph = GraphBuilder(def_path, phase).build()
  File "/Users/auyer/python/caffe-tensorflow/kaffe/graph.py", line 140, in __init__
    self.load()
  File "/Users/auyer/python/caffe-tensorflow/kaffe/graph.py", line 144, in load
    self.params = get_caffe_resolver().NetParameter()
  File "/Users/auyer/python/caffe-tensorflow/kaffe/caffe/resolver.py", line 32, in get_caffe_resolver
    SHARED_CAFFE_RESOLVER = CaffeResolver()
  File "/Users/auyer/python/caffe-tensorflow/kaffe/caffe/resolver.py", line 7, in __init__
    self.import_caffe()
  File "/Users/auyer/python/caffe-tensorflow/kaffe/caffe/resolver.py", line 17, in import_caffe
    from . import caffepb
  File "/Users/auyer/python/caffe-tensorflow/kaffe/caffe/caffepb.py", line 28, in <module>
    type=None),
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 693, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

The same error appeared when trying to convert the "googlenet_places205" network.

$ python --version
Python 2.7.15

$ pip list
...
tensorboard                   1.8.0
tensorflow                    1.8.0
tensorflow-serving-api        1.8.0

@SANTO-P
Copy link

SANTO-P commented Jun 27, 2018

yeah..same issue

@edkair
Copy link

edkair commented Jun 28, 2018

Solution is #114

@kkheon kkheon mentioned this issue Jun 13, 2020
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

3 participants