Preface

Artificial Intelligence (AI), the simulation of human intelligence in computers, has a long history. Since its official birth in 1956, AI has experienced several booms and busts. The ongoing AI resurgence, or the new AI revolution, started in 2012 with the breakthrough in deep learning, a branch of machine learning that is now the hottest branch of AI because of deep learning, when a deep convolutional neural network (DCNN) won the ImageNet Large-Scale Visual Recognition Challenge with an error rate of only 16.4%, compared to the second best non-DCNN entry with an error rate of 26.2%. Since 2012, improved DCNN-based entries have won the ImageNet challenge every year, and deep learning technology has been applied to many hard AI problems beyond computer vision, such as speech recognition, machine translation, and the game of Go, resulting in one breakthrough after another. In March 2016, Google DeepMind's AlphaGo, built with deep reinforcement learning, beat 18-time human world Go champion Lee Sedol 4:1. At Google I/O 2017, Google announced that they're shifting from mobile-first to AI-first world. Other leading companies such as Amazon, Apple, Facebook, and Microsoft have all invested heavily in AI and launched many AI-powered products.

TensorFlow is Google's open source framework for building machine learning AI apps. Since its initial release in November 2015, when there were already several popular open source deep learning frameworks, TensorFlow has quickly become the most popular open source deep learning framework in less than 2 years. New TensorFlow models to tackle all kinds of tasks that'd require human or even superhuman intelligence have been built on a weekly basis. Dozens of books on TensorFlow have been published. More online blogs, tutorials, courses, and videos on TensorFlow have been made available. It's obvious that AI and TensorFlow are hot, but why another book with the word "TensorFlow" in its title?

This is a unique book, and the first one that combines TensorFlow-powered AI with mobile, connecting the world of the brightest future with the world of most prosperous present. We have all witnessed and experienced the iOS and Android smart phone revolution in the past decade, and we're just starting the AI revolution that'll likely have an even deeper impact on the world around us. What can be better than a theme that integrates the best of the two worlds, a book that shows how to build TensorFlow AI apps on mobile, anytime, anywhere?

It's true that you can build AI apps using many cloud AI APIs that exist out there, and sometimes it makes sense. However, running AI apps completely on mobile devices have the benefits that you can run the apps even when no network connectivity is available, when you can't afford the round trip to a cloud server, or when users don't want to send the data on their phones to anyone else.

It's also true that there're already a few example TensorFlow iOS and Android apps in the TensorFlow open source project that can get you started with mobile TensorFlow. However, if you have ever tried to run a cool TensorFlow model that amazes you on your iOS or Android device, you'll most likely stumble upon many hiccups before you can see the model successfully running on your phone.

This book can save you a lot of time and effort by showing you how to solve all the common problems you may encounter when running TensorFlow models on mobile. You'll get to see more than 10 complete TensorFlow iOS and Android apps built from scratch in the book, running all kinds of cool TensorFlow models, including the latest and coolest Generative Adversarial Network (GAN) and AlphaZero-like models.