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

Python 3 Does Not Support Caffe Model Conversion #79

Closed
TobyRoseman opened this issue Dec 6, 2017 · 1 comment
Closed

Python 3 Does Not Support Caffe Model Conversion #79

TobyRoseman opened this issue Dec 6, 2017 · 1 comment
Labels
bug Unexpected behaviour that should be corrected (type)

Comments

@TobyRoseman
Copy link
Collaborator

Trying to convert any Caffe model in Python 3 will result in the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-0841eccd1027> in <module>()
----> 1 caffe_converter.convert('/Users/tobyroseman/Downloads/oxford102.caffemodel')

/Users/tobyroseman/anaconda3/lib/python3.6/site-packages/coremltools/converters/caffe/_caffe_converter.py in convert(model, image_input_names, is_bgr, red_bias, blue_bias, green_bias, gray_bias, image_scale, class_labels, predicted_feature_name, model_precision)
    181             blue_bias,
    182             green_bias, gray_bias, image_scale, class_labels,
--> 183             predicted_feature_name)
    184     model = MLModel(model_path)
    185 

/Users/tobyroseman/anaconda3/lib/python3.6/site-packages/coremltools/converters/caffe/_caffe_converter.py in _export(filename, model, image_input_names, is_bgr, red_bias, blue_bias, green_bias, gray_bias, image_scale, class_labels, predicted_feature_name)
    194            image_scale=1.0,
    195            class_labels=None, predicted_feature_name=None):
--> 196     from ... import libcaffeconverter
    197 
    198     if isinstance(model, basestring):

ImportError: dynamic module does not define module export function (PyInit_libcaffeconverter)
@TobyRoseman TobyRoseman added the bug Unexpected behaviour that should be corrected (type) label Dec 6, 2017
@gustavla
Copy link
Contributor

Resolved by #98.

Birch-san pushed a commit to Birch-san/coremltools that referenced this issue Nov 27, 2022
* uP

* finish downsampling layers

* finish major refactor

* remove bugus file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behaviour that should be corrected (type)
Projects
None yet
Development

No branches or pull requests

2 participants