hollance / YOLO-CoreML-MPSNNGraph

Tiny YOLO for iOS implemented using CoreML but also using the new MPS graph API.
MIT License
937 stars 252 forks source link

Error converting from h5 to Core ML #70

Open m1chaelt1 opened 3 years ago

m1chaelt1 commented 3 years ago

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 commented 3 years ago

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