I'm trying to create an updatable model, but this seems possible only by creating from scratch a neural network model and then, using the NeuralNetworkBuilder, call the make_updatable method.
But I met a lot of problems on this way for the solution.
In this example I try to open a converted ML Model (neural network) using the NeuralNetworkBuilder:
import coremltools
model = coremltools.models.MLModel("SimpleImageClassifier.mlpackage")
spec = model.get_spec()
builder = coremltools.models.neural_network.NeuralNetworkBuilder(spec=spec)
builder.inspect_layers()
But I met this error in the builder instance line:
AttributeError: 'NoneType' object has no attribute 'layers'
I also tried to define a neural network using the NeuralNetworkBuilder but then what do I have to do with this object? I didn't find a way to save it or convert it.
The result I want is simple, the possibility to train more the model on the user device to meet his exigences. However the way to obtain an updatable model seems incomprehensible.
In my case, the model should be an image classification.
What approach should I follow to achieve this result?
Thank you