Skip to Main Content
Machine Learning with Core ML
book

Machine Learning with Core ML

by Joshua Newnham
June 2018
Intermediate to advanced content levelIntermediate to advanced
378 pages
8h 43m
English
Packt Publishing
Content preview from Machine Learning with Core ML

Optimizing with batches

At the moment, our process involves iterating over each photo and performing inference on each one individually. With the release of Core ML 2, we now have the option to create a batch and pass this batch to our model for inference. As with efficiencies gained with economies of scale, here, we also gain significant improvements; so let's walk through adapting our project to process our photos in a single batch rather than individually.

Let's work our way up the stack, starting in our YOLOFacade class and moving up to the PhotoSearcher. For this we will be using our model directly rather than proxying through Vision, so our first task is to replace the model property of our YOLOFacade class with the following declaration: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Machine Learning with ML.NET

Hands-On Machine Learning with ML.NET

Jarred Capellman

Publisher Resources

ISBN: 9781788838290Supplemental Content