Post

Replies

Boosts

Views

Activity

Reply to Getting 'init()' is deprecated: Use init(configuration:) instead and handle errors appropriately.
This is simply a deprecation warning saying that the method you are using to initialize the CoreML model will not be supported in the future. I would suggest updating your code to use the more recent initialization technique as follows. let model: ImageClassifierModel = try! ImageClassifierModel(configuration: .init()) or let model: ImageClassifierModel = try! ImageClassifierModel(configuration: MLModelConfiguration()) Although, I would also handle the error if the model fails to initialize.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to CreateML on iOS
CreateML is simply a nice looking UI to make it easier for train machine learning models, thus it cannot be called on in your codebase. CoreML is the framework which allows you to integrate the models into your application. CoreML is a pretty strong framework that allows user specific model "tweaking/personalization" and even full retraining (although be cautious with the latter). You could manually acquire the data you wish to train on, and retain everyday using CreateML, although this might be quite tedious depending on the size of your data. You could manually train the model using the CoreML framework which would give you more flexibility but would require much more code on you behalf. If you have the time, check out https://machinethink.net/blog/coreml-training-part1/. This blog is one of the most useful resources on the internet related to CoreML information Side Note: From a general machine learning standpoint, it may not be in your best interest to retrain your model everyday on new data. This of course depends on your particular problem, but you may encounter time bias in some of your models if you approach the problem this way. Good luck.
Topic: Machine Learning & AI SubTopic: General Tags:
Jul ’21
Reply to CoreML Model in Swift Package Tests
No idea why this is happening, but the issue was that I had the mlmodelc file in the resources folder. Despite adding the resources in the package.swift, the Bundle.module property was not available because the generated resource_bundle_accessor.swift file was not generating. All I needed to do was more the mlmodelc file outside the resources folder and it worked.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’21