Skip to content
Advertisement

How to convert a CoreML Model to a TensorFlow Model?

I read that it is possible to convert a TensorFlow Model (.pb) file to CoreML (.mlmodel) to run it on iOS platforms. But I have some .mlmodel files that I want to run on tensorflow. So I want to know if there is any way I could convert them to .pb files or any other way I could use them in Tensorflow.

Advertisement

Answer

The good news: Yes, you can do this.

The bad news: You’ll have to do it by hand. There are no tools for doing this automatically.

The easiest solution is to define the model in TensorFlow, then copy the weights from the Core ML model into the TF model.

Advertisement