You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i got
"Traceback (most recent call last):
File "convert.py", line 5, in
predicted_feature_name='class_labels.txt'
File "/root/.local/lib/python2.7/site-packages/coremltools-0.8-py2.7.egg/coremltools/converters/caffe/_caffe_converter.py", line 191, in convert
predicted_feature_name)
File "/root/.local/lib/python2.7/site-packages/coremltools-0.8-py2.7.egg/coremltools/converters/caffe/_caffe_converter.py", line 255, in _export
predicted_feature_name)
MemoryError: std::bad_alloc
"
why example fails ?? thanks
The text was updated successfully, but these errors were encountered:
I see. There is a bug in the documentation. Instead of "predicted_feature_name", the argument should be "class_labels". Kindly see documentation here, it is correctly described there.
Also, when you download the class_labels.txt file linked in the page https://apple.github.io/coremltools/, it gets downloaded as a file named "synset_words.txt" so you should use that name instead, i.e.:
run the example in https://apple.github.io/coremltools/ for model conversion
"
import coremltools
Convert a caffe model to a classifier in Core ML
coreml_model = coremltools.converters.caffe.convert(('bvlc_alexnet.caffemodel', 'deploy.prototxt'),
predicted_feature_name='class_labels.txt'
)
Now save the model
coreml_model.save('BVLCObjectClassifier.mlmodel')
"
i got
"Traceback (most recent call last):
File "convert.py", line 5, in
predicted_feature_name='class_labels.txt'
File "/root/.local/lib/python2.7/site-packages/coremltools-0.8-py2.7.egg/coremltools/converters/caffe/_caffe_converter.py", line 191, in convert
predicted_feature_name)
File "/root/.local/lib/python2.7/site-packages/coremltools-0.8-py2.7.egg/coremltools/converters/caffe/_caffe_converter.py", line 255, in _export
predicted_feature_name)
MemoryError: std::bad_alloc
"
why example fails ?? thanks
The text was updated successfully, but these errors were encountered: