-1

How to convert resnet50 network written in eager_execution mode into coreml?

Here is the tf resnet50 implementation: https://github.com/tensorflow/tensorflow/blob/r1.13/tensorflow/contrib/eager/python/examples/resnet50/resnet50.py

Azi
  • 11
  • 2

1 Answers1

0

At this point, coremltools and tfcoreml don't handle eager mode. You'll need to convert your TF model to a "frozen" .pb graph file first, and then you can use tfcoreml to convert it to Core ML.

If you can't turn your model into a frozen graph file, you can't use the automated conversion tools... But even in that case, you can still create a Core ML model using NeuralNetworkBuilder (part of coremltools), but you'll have to do all of this by hand.

Matthijs Hollemans
  • 7,706
  • 2
  • 16
  • 23
  • Thanks Matthijs! Would you please elaborate on how I can freeze graph and save it into '.pb' format? I have tried the solution here but it didn't work: https://stackoverflow.com/questions/55529755/how-to-convert-model-in-eager-execution-to-static-graph-and-save-in-pb-file/55531285 – Azi Jun 04 '19 at 02:37
  • I don't know, I haven't used TF in eager mode yet. – Matthijs Hollemans Jun 04 '19 at 07:39