ioscoremlmlmodel

How to deploy CoreML model in TensorFlow, Keras or PyTorch?


The tutorials about CoreML model are all converting TensorFlow model or PyTorch model to CoreML model. If the pre-trained model file is mlmodel type, I do not know how to use it in python and how to convert the mlmodel to tf model.

How to read it and deploy the CoreML model by TensorFlow, Keras or PyTorch in Python?


Solution

  • You will have to write a program that converts the mlmodel file to a TensorFlow, Keras, or PyTorch model. Such a converter doesn't exist because not many people want to do this. Usually they already have the model in TF, Keras, or PyTorch format.

    Note: On the Mac, you can use coremltools to run a Core ML model from Python.