0%

Book Description

Develop robust AI applications with TensorFlow, Cloud AutoML, TPUs, and other GCP services

Key Features

  • Focus on AI model development and deployment in GCP without worrying about infrastructure
  • Manage feature processing, data storage, and trained models using Google Cloud Dataflow
  • Access key frameworks such as TensorFlow and Cloud AutoML to run your deep learning models

Book Description

With a wide range of exciting tools and libraries such as Google BigQuery, Google Cloud Dataflow, and Google Cloud Dataproc, Google Cloud Platform (GCP) enables efficient big data processing and the development of smart AI models on the cloud. This GCP book will guide you in using these tools to build your AI-powered applications with ease and managing thousands of AI implementations on the cloud to help save you time.

Starting with a brief overview of Cloud AI and GCP features, you'll learn how to deal with large volumes of data using auto-scaling features. You'll then implement Cloud AutoML to demonstrate the use of streaming components for performing data analytics and understand how Dialogflow can be used to create a conversational interface. As you advance, you'll be able to scale out and speed up AI and predictive applications using TensorFlow. You'll also leverage GCP to train and optimize deep learning models, run machine learning algorithms, and perform complex GPU computations using TPUs. Finally, you'll build and deploy AI applications to production with the help of an end-to-end use case.

By the end of this book, you'll have learned how to design and run experiments and be able to discover innovative solutions without worrying about infrastructure, resources, and computing power.

What you will learn

  • Understand the basics of cloud computing and explore GCP components
  • Work with the data ingestion and preprocessing techniques in GCP for machine learning
  • Implement machine learning algorithms with Google Cloud AutoML
  • Optimize TensorFlow machine learning with Google Cloud TPUs
  • Get to grips with operationalizing AI on GCP
  • Build an end-to-end machine learning pipeline using Cloud Storage, Cloud Dataflow, and Cloud Datalab
  • Build models from petabytes of structured and semi-structured data using BigQuery ML

Who this book is for

If you're an artificial intelligence developer, data scientist, machine learning engineer, or deep learning engineer looking to build and deploy smart applications on Google Cloud Platform, you'll find this book useful. A fundamental understanding of basic data processing and machine learning concepts is necessary. Though not mandatory, familiarity with Google Cloud Platform will help you make the most of this book.

Table of Contents

  1. Title Page
  2. About Packt
    1. Why subscribe?
  3. Copyright and Credits
    1. Hands-On Artificial Intelligence on Google Cloud Platform
  4. Contributors
    1. About the authors
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Section 1: Basics of Google Cloud Platform
  7. Overview of AI and GCP
    1. Understanding the Cloud First strategy for advanced data analytics
      1. Advantages of a Cloud First strategy
      2. Anti-patterns of the Cloud First strategy 
    2. Google data centers
    3. Overview of GCP
    4. AI building blocks
      1. Data
        1. Storage
        2. Processing
        3. Actions
      2. Natural language processing 
      3. Speech recognition
      4. Machine vision
      5. Information processing and reasoning
      6. Planning and exploring
      7. Handling and control
      8. Navigation and movement
      9. Speech generation
      10. Image generation
    5. AI tools available on GCP
      1. Sight
      2. Language
      3. Conversation
    6. Summary
  8. Computing and Processing Using GCP Components
    1. Understanding the compute options
      1. Compute Engine
        1. Compute Engine and AI applications
      2. App Engine
        1. App Engine and AI applications
      3. Cloud Functions
        1. Cloud Functions and AI applications
      4. Kubernetes Engine
        1. Kubernetes Engine and AI applications
    2. Diving into the storage options
      1. Cloud Storage
        1. Cloud Storage and AI applications
      2. Cloud Bigtable
        1. Cloud Bigtable and AI applications
      3. Cloud Datastore
        1. Cloud Datastore and AI applications
      4. Cloud Firestore
        1. Cloud Firestore and AI applications
      5. Cloud SQL
        1. Cloud SQL and AI applications
      6. Cloud Spanner
        1. Cloud Spanner and AI applications
      7. Cloud Memorystore
        1. Cloud Memorystore and AI applications
      8. Cloud Filestore
        1. Cloud Filestore and AI applications
    3. Understanding the processing options
      1. BigQuery
        1. BigQuery and AI applications
      2. Cloud Dataproc
        1. Cloud Dataproc and AI applications
      3. Cloud Dataflow
        1. Cloud Dataflow and AI applications
    4. Building an ML pipeline 
      1. Understanding the flow design
      2. Loading data into Cloud Storage
      3. Loading data to BigQuery
      4. Training the model
      5. Evaluating the model
      6. Testing the model
    5. Summary
  9. Section 2: Artificial Intelligence with Google Cloud Platform
  10. Machine Learning Applications with XGBoost
    1. Overview of the XGBoost library
      1. Ensemble learning
        1. How does ensemble learning decide on the optimal predictive model?
          1. Reducible errors – bias
          2. Reducible errors – variance
          3. Irreducible errors
          4. Total error
        2. Gradient boosting
        3. eXtreme Gradient Boosting (XGBoost)
    2. Training and storing XGBoost machine learning models
    3. Using XGBoost trained models
    4. Building a recommendation system using the XGBoost library
      1. Creating and testing the XGBoost recommendation system model 
    5. Summary
  11. Using Cloud AutoML
    1. Overview of Cloud AutoML 
      1. The workings of AutoML
      2. AutoML API overview
        1. REST source – pointing to model locations
        2. REST source – for evaluating the model
        3. REST source – the operations API
    2. Document classification using AutoML Natural Language
      1. The traditional machine learning approach for document classification
      2. Document classification with AutoML
        1. Navigating to the AutoML Natural Language interface
        2. Creating the dataset
        3. Labeling the training data
        4. Training the model
        5. Evaluating the model
          1. The command line
          2. Python
          3. Java
          4. Node.js
        6. Using the model for predictions
          1. The web interface
          2. A REST API for model predictions
          3. Python code for model predictions
    3. Image classification using AutoML Vision APIs
      1. Image classification steps with AutoML Vision 
        1. Collecting training images
          1. Creating a dataset
        2. Labeling and uploading training images
        3. Training the model
        4. Evaluating the model
          1. The command-line interface
          2. Python code
        5. Testing the model
          1. Python code
    4. Performing speech-to-text conversion using the Speech-to-Text API
      1. Synchronous requests
      2. Asynchronous requests
      3. Streaming requests
    5. Sentiment analysis using AutoML Natural Language APIs
    6. Summary
  12. Building a Big Data Cloud Machine Learning Engine
    1. Understanding ML
    2. Understanding how to use Cloud Machine Learning Engine
      1. Google Cloud AI Platform Notebooks
        1. Google AI Platform deep learning images
        2. Creating Google Platform AI Notebooks
        3. Using Google Platform AI Notebooks
        4. Automating AI Notebooks execution
    3. Overview of the Keras framework 
    4. Training your model using the Keras framework
    5. Training your model using Google AI Platform
    6. Asynchronous batch prediction using Cloud Machine Learning Engine
    7. Real-time prediction using Cloud Machine Learning Engine
    8. Summary
  13. Smart Conversational Applications Using DialogFlow
    1. Introduction to DialogFlow
      1. Understanding the building blocks of DialogFlow
    2. Building a DialogFlow agent
      1. Use cases supported by DialogFlow
    3. Performing audio sentiment analysis using DialogFlow
    4. Summary
  14. Section 3: TensorFlow on Google Cloud Platform
  15. Understanding Cloud TPUs
    1. Introducing Cloud TPUs and their organization
      1. Advantages of using TPUs
    2. Mapping of software and hardware architecture
      1. Available TPU versions
      2. Performance benefits of TPU v3 over TPU v2
      3. Available TPU configurations
      4. Software architecture
    3. Best practices of model development using TPUs
      1. Guiding principles for model development on a TPU
    4. Training your model using TPUEstimator
      1. Standard TensorFlow Estimator API
      2. TPUEstimator programming model
      3. TPUEstimator concepts
      4. Converting from TensorFlow Estimator to TPUEstimator
    5. Setting up TensorBoard for analyzing TPU performance
    6. Performance guide
      1. XLA compiler performance
      2. Consequences of tiling
      3. Fusion
    7. Understanding preemptible TPUs
      1. Steps for creating a preemptible TPU from the console
      2. Preemptible TPU pricing
      3. Preemptible TPU detection 
    8. Summary
  16. Implementing TensorFlow Models Using Cloud ML Engine
    1. Understanding the components of Cloud ML Engine
      1. Training service
        1. Using the built-in algorithms
        2. Using a custom training application
      2. Prediction service
      3. Notebooks
      4. Data Labeling Service
      5. Deep learning containers
    2. Steps involved in training and utilizing a TensorFlow model
      1. Prerequisites
      2. Creating a TensorFlow application and running it locally
        1. Project structure recommendation
        2. Training data
    3. Packaging and deploying your training application in Cloud ML Engine
    4. Choosing the right compute options for your training job
      1. Choosing the hyperparameters for the training job
    5. Monitoring your TensorFlow training model jobs
    6. Summary
  17. Building Prediction Applications
    1. Overview of machine-based intelligent predictions
      1. Understanding the prediction process
    2. Maintaining models and their versions
    3. Taking a deep dive into saved models
      1. SignatureDef in the TensorFlow SavedModel
      2. TensorFlow SavedModel APIs
    4. Deploying the models on GCP
      1. Uploading saved models to a Google Cloud Storage bucket
      2. Testing machine learning models
      3. Deploying models and their version
    5. Model training example
    6. Performing prediction with service endpoints
    7. Summary
  18. Section 4: Building Applications and Upcoming Features
  19. Building an AI application
    1. A step-by-step approach to developing AI applications
      1. Problem classification 
        1. Classification
        2. Regression
        3. Clustering
        4. Optimization
        5. Anomaly detection
        6. Ranking
        7. Data preparation
      2. Data acquisition 
      3. Data processing 
      4. Problem modeling 
      5. Validation and execution
        1. Holdout
        2. Cross-validation
        3. Model evaluation parameters (metrics)
        4. Classification metrics
      6. Model deployment
    2. Overview of the use case – automated invoice processing (AIP)
    3. Designing AIP with AI platform tools on GCP
      1. Performing optical character recognition using the Vision API
      2. Storing the invoice with Cloud SQL
        1. Creating a Cloud SQL instance
        2. Setting up the database and tables
        3. Enabling the Cloud SQL API 
        4. Enabling the Cloud Functions API 
        5. Creating a Cloud Function 
        6. Providing the Cloud SQL Admin role
      3. Validating the invoice with Cloud Functions
      4. Scheduling the invoice for the payment queue (pub/sub)
      5. Notifying the vendor and AP team about the payment completion
      6. Creating conversational interface for AIP
    4. Upcoming features
    5. Summary
  20. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
3.145.69.255