This is a simple tutorial for implementing machine learning with custom model in mobile apps. This tutorial consists of 3 parts
Simple TensorFlow Model for computing y= 2x+1. There are 3 repos
This model is used to calculate 2x+1 value for the given input. Accuracy is 98%.
iOS project uses SwiftUI and CoreML. Code is meant to be kept simple. Do not use this for production.
- Go to colab.google.com
- Clone and Open the jupyter notebook(ipynb) in this repo
- Click 'Connect' and wait till you get a free connection to google compute python backend
- Run the code
- Download SampleMLModel.mlmodel and replace the existing 'SampleMLModel.mlmodel' in 'ml' folder
- Run the iOS app
- Select the input via Slider in the iOS Simulator
- Output in displayed below
Alternatively, I have included my training model in this repo and so you can do steps #6-#8 .