coremltools ValueError: Unable to determine the type of the model, i.e. the source framework

52 Views Asked by At

I have trained perfectly which is giving 99 % accuracy. Now I want it to convert into the coreML model so that I can integrated it into my phone. Code is giving this error while I am trying to convert the models into the coreML

import tensorflow as tf
import tfcoreml
import coremltools as ct

# Convert TensorFlow model to Core ML

mlmodel = ct.convert(model, convert_to="mlprogram",
                    inputs={'input_1': (None, 7)},
                    outputs=['Activity'])

mlmodel.save("mobilenet.mlpackage")

here is the simple code that I am using form model conversion.

Python version: 3.10.9 TensorFlow version: 2.13.0

0

There are 0 best solutions below