Page 18 - MSDN Magazine, December 15, 2017
P. 18
MACHINE LEARNING
Delivering On-Device
Machine Learning
Solutions
Larry O’Brien
You’ve read the headlines: Artificial intelligence and machine learning (AI/ML) technologies are rewriting the bench- marks across a vast swath of hard problems. Whether it’s AlphaGo besting the best human Go player or AlphaGo Zero beating that in three days of learning the game from scratch, or Microsoft Research setting a new benchmark for conversation speech recognition, every week seems to bring some new advance built on “deep learning” and “artificial neural networks.” Or perhaps you’ve been more interested in the headlines about bidding wars on the salaries and signing bonuses for developers with ML competence. Either way, the AI/ ML train is leaving the station and you don’t want to be left behind.
While AI/ML research is advancing at a truly giddy pace, a less celebrated but equally exciting trend is the availability of easy-to-use
libraries for delivering ML functionality on mobile and edge devices. CoreML on iOS and Tensorflow Android Inference on Android are straightforward and consistent once you understand the tools and workflow. As a career strategy, competence in ML technolo- gies is one of the hottest ways toward career flexibility and higher compensation. (From Twitter: “It’s AI when you’re raising money, it’s ML when you’re hiring devs.”)
It’s easy to be intimidated by the latest headlines about AI sys- tems achieving superhuman performance in voice transcription or game-playing, but as Satya Nadella writes in his book, “Hit Refresh” (HarperBusiness, 2017), “Every organization today needs new cloud-based infrastructure and applications that can convert vast amounts of data into predictive and analytical power through theuseofadvancedanalytics,machinelearning,andAI.”
Many articles and demos about device-based ML focus on vision tasks. This is an area where there has been truly astounding advancement in the past decade. Object detection, captioning and image-to-image style transfer have all advanced at a blistering pace. Azure Cognitive Services CustomVision (customvision.ai) makes it ridiculously simple to develop custom classification models that can be deployed on iOS using the techniques described in this article.
While visual and audio understanding are both inherently important and historically challenging, the “deep learning” revo- lution in ML goes well beyond these areas. Pattern recognition is at the core of modern ML. Many developers work in areas where recognizing patterns in complex and noisy data is central to their
This article discusses:
• Developing a machine learning model using Keras and Tensorflow
• Converting models to CoreML and Tensorflow protobuf files
• Loading and inferencing using CoreML on iOS and Tensorflow Android Inference on Android
• UsingXamarin.FormstocreateacommonUXandUIforinferencing
Technologies discussed:
Keras, Tensorflow, Pandas, Long Short Term Memory,
Deep Neural Networks, CoreML, Tensorflow Android Inference, Xamarin.Forms, Python, C#
14 msdn magazine