In looking over the new CoreML API, I don\'t see any way to continue training the model after generating the .mlmodel and bundling it in your app. This makes me think that I
As alternative to bundling an mlmodel
with application, you can download and then compile models within your CoreML app. For this you just need to download the model definition
file onto the user’s device by using, for example, URLSession. And after this you have to compile the model definition
by calling a throwing compileModel(at:)
type method.
let newCompiledModel = try MLModel.compileModel(at: modelDescriptionURL)
You'll get a new compiled model file with the same name as the model description but its ending will be mlmodelc
. Eventually, create a new MLModel instance by passing the compiled model URL to its initialiser.
let model = try MLModel(contentsOf: newCompiledModel)
However, remember that compiling process may be time consuming and it shouldn't be done on main thread.