Tflite-model-maker with MacOS 12

I want to use this:

with this:

Is this possible? I want the brevity/ease of use of tflite-model-maker with the acceleration capabilities of my M1 MacBook Air running macOS 12.0.

I successfully completed the step to install tensorflow-macos, which to my understanding is just a special version of tensorflow 2.5 to take advantage of the M1 hardware acceleration.

Now, when I try to follow the tflite-model-maker example this happens:

I expected an error because in the requirements.txt, tensorflow==2.6.0 is specified (not tensorflow-macos==2.5.0).

Could I just edit that requirements file to specify tensorflow-macos=2.5.0 instead of tensorflow==2.6.0? Or is there an older version of tflite-model-maker that will work with tensorflow-macos==2.5.0?

I assume this is what is also causing the tflite-support dependency problem.

@Yuqi_Li or @Tian_LIN ight be able to help here

Can you try pip install tflite-model-maker first and then tensorflow-metal?

  • Basically satisfy tflite-model-maker requirements first, and then use tensorflow-metal while preserving the tensorflow API.

We didn’t do that before, so are not sure whether it is possible. Please let us know your experience. Good luck! :slight_smile:

1 Like