-
Notifications
You must be signed in to change notification settings - Fork 46
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
Cannot convert to CoreML #8
Comments
I can add that I'm trying to convert a YOLOv3-tiny model |
I used python 3.6.5 with |
@Ma-Dan Do you use the keras-yolo3 repo to convert from Darknet to Keras? |
Okay @Ma-Dan. I installed a fresh Python 3.6.5 from here: https://www.python.org/downloads/release/python-365/ You can see in the image I attach that I have the versions of tensorflow, keras and coremltools that you specified. I created a virtualenv and installed dependencies with correct versions and I get this error message: |
I used this https://github.com/qqwweee/keras-yolo3 to convert my model trained using Darknet to a Keras model.
I'm trying to convert it to CoreML but get errors. I think it would be very good if you could specify how your virtualenv looks like when you do this @Ma-Dan
The error I get:
tf.estimator package not installed.
tf.estimator package not installed.
Traceback (most recent call last):
File "coreml.py", line 3, in
coreml_model = coremltools.converters.keras.convert('Doors.h5', input_names='input1', image_input_names='input1', output_names=['output1', 'output2', 'output3'], image_scale=1/255.)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 760, in convert
custom_conversion_functions=custom_conversion_functions)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 537, in convertToSpec
custom_objects=custom_objects)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 168, in _convert
model = _keras.models.load_model(model, custom_objects = custom_objects)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/models.py", line 142, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/models.py", line 193, in model_from_config
return layer_from_config(config, custom_objects=custom_objects)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 40, in layer_from_config
custom_objects=custom_objects)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/engine/topology.py", line 2582, in from_config
process_layer(layer_data)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/engine/topology.py", line 2560, in process_layer
custom_objects=custom_objects)
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 42, in layer_from_config
return layer_class.from_config(config['config'])
File "/home/jakup/Utilities/coreml/local/lib/python2.7/site-packages/keras/engine/topology.py", line 1025, in from_config
return cls(**config)
TypeError: init() got an unexpected keyword argument 'dtype'
The text was updated successfully, but these errors were encountered: