So you’ve got your Keras model set up, and it can do everything you want it to do. But how do you get it onto an iOS device? Thanks to Apple’s Core ML library, this process is painless and can be done in less than 10 lines of code. Better yet, once you write the code I’ll show you below, there’s very little you’ll have to change for the next time you need to convert a model. Here’s a link to the GitHub repo:
Now let’s begin!
Before we start, what does the whole process look like? …
N-Queens is a famous computer science problem. The goal is to place “N” Number of queens on an “N x N” sized chess board such that no queen is under attack by another queen. There’s plenty of solutions to this problem, but there’s one particular algorithm which is my favorite: Min-Conflicts. Min-conflicts will randomly choose a queen, and move it to a place on the board where there are less conflicting queens than there are now. If there is no such spot, it will pick another random queen and continue to iterate. Seems pretty simple right?
Let’s take 5 minutes to make an iOS image classifier to classify cats and dogs. Naturally, this can be extended to classify anything, but come on, cats and dogs are a cute start.
The first thing we’re going to do is make two folders on our desktop: one titled “Training Data” and the other titled “Testing Data”. Make sure that the spelling on these two folders, and all of the following folders, match exactly mine or you will encounter some cryptic error messages.
An iOS and MacOS Natural language processing model for determining people’s feelings can be implemented and exported extremely easily using Apple’s CreateML library and text from people’s past tweets. Let’s download the data and test it out!
After unzipping the data from the link above, drag and drop the .csv file in to somewhere convenient. Next, open up a playground on Xcode, select MacOS, and select a blank file.
I haven’t seen a list that nicely formulates the steps needed to go from beginner to practitioner in machine learning for free, so I created this post. Machine learning is a very very big field that’s having explosive growth right now due to the recent advances in hardware and the resurgence of some key ideas. However, none of this is particularly useful if you just wanna get started and make something cool like an image detection program. I want to stress that the list below is if you’re trying to use the machine learning knowledge you learn for something practical rather than theoretical. Believe me, there’s a big difference. …