Book Image

Mobile Artificial Intelligence Projects

By : Karthikeyan NG, Arun Padmanabhan, Matt R. Cole
Book Image

Mobile Artificial Intelligence Projects

By: Karthikeyan NG, Arun Padmanabhan, Matt R. Cole

Overview of this book

We’re witnessing a revolution in Artificial Intelligence, thanks to breakthroughs in deep learning. Mobile Artificial Intelligence Projects empowers you to take part in this revolution by applying Artificial Intelligence (AI) techniques to design applications for natural language processing (NLP), robotics, and computer vision. This book teaches you to harness the power of AI in mobile applications along with learning the core functions of NLP, neural networks, deep learning, and mobile vision. It features a range of projects, covering tasks such as real-estate price prediction, recognizing hand-written digits, predicting car damage, and sentiment analysis. You will learn to utilize NLP and machine learning algorithms to make applications more predictive, proactive, and capable of making autonomous decisions with less human input. In the concluding chapters, you will work with popular libraries, such as TensorFlow Lite, CoreML, and PyTorch across Android and iOS platforms. By the end of this book, you will have developed exciting and more intuitive mobile applications that deliver a customized and more personalized experience to users.
Table of Contents (12 chapters)
PyTorch Experiments on NLP and RNN
TensorFlow on Mobile with Speech-to-Text with the WaveNet Model
Implementing GANs to Recognize Handwritten Digits

Building an ANN model for prediction using Keras and TensorFlow

Now that we have our libraries installed, let's create a folder called aibook and within that create another folder called chapter2. Move all the code for this chapter into the chapter2 folder. Make sure that the conda environment is still active (the prompt will start with the environment name):

Once within the chapter2 folder, type jupyter notebook. This will open an interactive Python editor on the browser.

Use the New dropdown in the top-right corner to create a new Python 3 notebook:

We are now ready to build our first ANN using Keras and TensorFlow, to predict real estate prices:

  1. Import all the libraries that we need for this exercise. Use the first cell to import all the libraries and run it. Here are the four main libraries we will use:
    • pandas: We use this to read the data and store it in a dataframe...