官术网_书友最值得收藏!

Prototyping the first machine learning app

Usually, before implementing a machine learning application for mobile devices, you want to do a quick and dirty prototype just to check your ideas. This allows to save a lot of time when you realize that the model you initially thought works perfectly for your problem, in reality doesn't. The quickest way to do a prototype is to use Python or R tools listed in the previous section.

Python is a general-purpose programming language with rich infrastructure and vibrant community. Its syntax is similar in many ways to Swift's one. Throughout this book, we'll use it for prototyping, and Swift for actual development.

When you have tested your ideas and a model prototype works as you expect, you can start thinking about how to port it to an iOS. You have several options here:

Inference-only options:

  • Check the Core ML, and a list of the Python libraries it supports. Maybe, you will be able to export your model in Core ML format, and run it on a device.
  • Write the custom converter for your model if it is not supported by the Core ML.

Training and inference options:

  • Write the algorithms from scratch. In this book, we are implementing a bunch of machine learning algorithms, so you'll see that it's not that hard. Still, this is the most time-consuming option, and the model's results may differ significantly.
  • Check available iOS-compatible libraries (see chapter on Chapter 11, Machine Learning Libraries).
主站蜘蛛池模板: 蓝田县| 麦盖提县| 招远市| 临泉县| 阜城县| 汉川市| 鹤壁市| 平罗县| 庆阳市| 宜州市| 怀宁县| SHOW| 师宗县| 鹤峰县| 巴彦淖尔市| 孟连| 涪陵区| 霍林郭勒市| 富平县| 隆回县| 康乐县| 宁陕县| 乐清市| 平定县| 泰和县| 凤山县| 温宿县| 兴隆县| 镇赉县| 峡江县| 沂源县| 吉首市| 千阳县| 米泉市| 中西区| 定兴县| 津市市| 安阳市| 盐城市| 乳山市| 镇平县|