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

Error converting from h5 to Core ML #70

Open
m1chaelt1 opened this issue Feb 4, 2021 · 1 comment
Open

Error converting from h5 to Core ML #70

m1chaelt1 opened this issue Feb 4, 2021 · 1 comment

Comments

@m1chaelt1
Copy link

Error: ValueError: Invalid layer: Functional

(coreml) (base) MacBook-Pro-78:Convert michaelt$ python coreml.py
WARNING:root:TensorFlow version 1.15.0 detected. Last version known to be fully compatible is 1.5.0 .
Traceback (most recent call last):
File "coreml.py", line 11, in
image_scale=1/255.)
File "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 752, in convert
custom_conversion_functions=custom_conversion_functions)
File "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 532, in convertToSpec
custom_objects=custom_objects)
File "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/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 "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/models.py", line 142, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/models.py", line 193, in model_from_config
return layer_from_config(config, custom_objects=custom_objects)
File "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 35, in layer_from_config
instantiate=False)
File "/Users/michaelt/Downloads/YOLO-CoreML-MPSNNGraph-master/Convert/coreml/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 125, in get_from_module
str(identifier))
ValueError: Invalid layer: Functional

@m1chaelt1
Copy link
Author

m1chaelt1 commented Feb 4, 2021

keras == 1.2.2
coremltools == 2.0
tensorflow == 1.15.0

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

1 participant