Convert from Tensorflow to CoreML
coremltools (Recommended approach)
For converting TensorFlow models to CoreML format, the recommended approach is to use TensorFlow converter available through new unified conversion API, introduced in
coremltools 4.0 python package.
Please read the coremltools documentation on Tensorflow conversion for example usage.
To install coremltools package, please follow these instructions in the coremltools documentation.
tfcoreml package is no longer maintained.
tfcoreml.convert should only be used if all of the following conditions are met:
- Primary deployment target is
iOS 12or earlier.
- Source model is a TensorFlow 1
graph_defobject serialized as frozen protobuf format (".pb")
tfcoreml, please run:
pip install --upgrade tfcoreml
Please read this usage section which illustrates how to convert models using
For access to new features, bug fixes, community support and requests, please use coremltools github repository.