O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hands-On Artificial Intelligence with TensorFlow

Book Description

Exploit TensorFlow's capabilities to build artificial intelligence applications

Key Features

  • Exploit TensorFlow's new features to power your artificial intelligence apps
  • Implement machine learning, deep learning, and reinforcement learning models with Tensorflow
  • Build intelligent applications for computer vision, NLP, and healthcare, among others

Book Description

Artificial Intelligence (AI) is a popular area with an emphasis on creating intelligent machines that can reason, evaluate, and understand the same way as humans. It is used extensively across many fields, such as image recognition, robotics, language processing, healthcare, finance, and more.

Hands-On Artificial Intelligence with TensorFlow gives you a rundown of essential AI concepts and their implementation with TensorFlow, also highlighting different approaches to solving AI problems using machine learning and deep learning techniques. In addition to this, the book covers advanced concepts, such as reinforcement learning, generative adversarial networks (GANs), and multimodal learning.

Once you have grasped all this, you'll move on to exploring GPU computing and neuromorphic computing, along with the latest trends in quantum computing. You'll work through case studies that will help you examine AI applications in the important areas of computer vision, healthcare, and FinTech, and analyze their datasets. In the concluding chapters, you'll briefly investigate possible developments in AI that we can expect to see in the future.

By the end of this book, you will be well-versed with the essential concepts of AI and their implementation using TensorFlow.

What you will learn

  • Explore the core concepts of AI and its different approaches
  • Use the TensorFlow framework for smart applications
  • Implement various machine and deep learning algorithms with TensorFlow
  • Design self-learning RL systems and implement generative models
  • Perform GPU computing efficiently using best practices
  • Build enterprise-grade apps for computer vision, NLP, and healthcare

Who this book is for

Hands-On Artificial Intelligence with TensorFlow is for you if you are a machine learning developer, data scientist, AI researcher, or anyone who wants to build artificial intelligence applications using TensorFlow. You need to have some working knowledge of machine learning to get the most out of this book.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Artificial Intelligence with TensorFlow
  3. Packt Upsell
    1. Why subscribe?
    2. Packt.com
  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. Conventions used
    4. Get in touch
      1. Reviews
  6. Overview of AI
    1. Artificial intelligence
    2. A brief history of AI
      1. The importance of big data
    3. Basic terms and concepts
      1. Understanding ML, DL, and NN
      2. Algorithms
        1. Machine learning (ML)
          1. Supervised learning
          2. Unsupervised learning
          3. Semi-supervised learning
          4. Reinforcement learning
        2. Neural network
        3. Deep learning
      3. Natural language processing (NLP)
      4. Transfer learning
      5. Black box
      6. Autonomous
    4. Applications of AI
    5. Recent developments in AI
      1. Deep reinforcement learning
      2. RNNs and LSTMs
      3. Deep learning and convolutional networks
        1. Image recognition
        2. Natural language processing (NLP)
      4. Autonomous driving
    6. Limitations of the current state of AI
    7. Towards artificial general intelligence (AGI)
      1. AGI through reinforcement learning
      2. AGI through transfer learning
      3. Recursive cortical networks (RCNs)
      4. The fusion of AI and neuroscience
    8. Is singularity near?
      1. What exactly is singularity?
      2. The Turing test
      3. When is this supposed to happen?
    9. Summary
  7. TensorFlow for Artificial Intelligence
    1. The basics of tensorflow
      1. Tensors
      2. Operations
      3. Graphs
      4. Sessions
      5. Placeholders
      6. Variables
    2. Perceptron
      1. Learning the Boolean OR operation
        1. Using the sign function
        2. Introducing a classifier
        3. The perceptron learning algorithm
        4. Perfect separation
      2. Linear separability
    3. Summary
  8. Approaches to Solving AI
    1. Learning types
      1. Supervised learning
      2. Unsupervised learning
      3. Reinforcement learning
    2. Multilayer perceptrons
    3. High-level APIs
      1. Keras
      2. Estimators
        1. Case study – wide and deep learning
    4. TensorBoard
    5. The bias-variance tradeoff
    6. Architectures
      1. Feedforward networks
      2. Convolutional neural networks
      3. Recurrent neural networks
    7. Tuning neural networks
      1. Pipeline
        1. Exploratory data analysis
        2. Preprocessing
        3. Training, test, and validation sets
        4. Metrics
        5. Establishing a baseline
        6. Diagnosing
        7. Optimizing hyperparameters
          1. Grid search
          2. Randomized search
          3. AutoML
    8. Summary
  9. Computer Vision and Intelligence
    1. Computer vision
    2. A step toward self-driving cars
    3. Image classification
      1. Neural network
      2. Convolutional neural networks
        1. Local receptive fields
        2. Shared weights and biases
        3. Pooling layers
        4.  Combining it all together
      3. MNIST digit classification using CNN
    4.  Self-driving cars
      1. Training phase
        1. Data pre-processing
        2. SelfDriveNet-CNN
        3. Self-Drive Net-training
        4. Self-Drive Net – Testing
    5. Summary
  10. Computational Understanding of Natural Language
    1. Sequence data
    2. Representation
      1. Terminology
      2. The preprocessing pipeline
        1. Segmentation
        2. Tokenization
        3. Sequence of tokens
        4. The bag-of-words model
        5. Normalization
        6. Bringing it all together
          1. CountVectorizer
          2. TfidfVectorizer
          3. spaCy
    3. Modeling
      1. Traditional machine learning
      2. Feedforward neural networks
        1. Embeddings
      3. Recurrent neural networks
        1. LSTM
        2. Bidirectional LSTMs
        3. RNN alternatives
          1. 1D ConvNets
        4. The best of both worlds
          1. RNN + 1D convnets
      4. Sequence-to-sequence models
        1. Machine translation
    4. Summary
  11. Reinforcement Learning
    1. The need for another learning paradigm
      1. The exploration-exploitation dilemma
      2. Shortcomings of supervised learning
      3. Time value of rewards
    2. Multi-armed bandits
      1. Random strategy
      2. The epsilon-greedy strategy
      3. Optimistic initial values
      4. Upper confidence bound
    3. Markov decision processes (MDPs)
      1. Value iteration
    4. Q-Learning
      1. Deep Q-Learning
        1. Lunar lander
          1. Random lunar lander
          2. Deep Q-learning lunar lander
    5. Summary
  12. Generative Adversarial Networks
    1. GANs
    2. Implementation of GANs
      1. Real data generator
      2. Random data generator
      3. Linear layer
      4. Generator
      5. Discriminator
      6. GAN
      7. Keep calm and train the GAN
    3. GAN for 2D data generation
      1. MNIST digit dataset
      2. DCGAN
        1. Discriminator
        2. Generator
          1. Transposed convolutions
          2. Batch normalization
        3. GAN-2D
          1. Training the GAN model for 2D data generation
    4. GAN Zoo
      1. BiGAN – bidirectional generative adversarial networks
      2. CycleGAN
      3. GraspGAN – for deep robotic grasping
      4. Progressive growth of GANs for improved quality
    5. Summary
  13. Multimodal Learning
    1. What is multimodal learning?
    2. Multimodal learning
      1. Multimodal learning architecture
        1. Information sources
        2. Feature extractor
        3. Aggregator network
    3. Image caption generator
      1. Dataset
      2. Visual feature extractor
      3. Textual feature extractor
      4. Aggregator model
    4. Caption generator architecture
      1. Importing the libraries
      2. Visual feature extraction
      3. Text processing
      4. Data preparation for training and testing
      5. Caption generator model
        1. Word embedding
    5. Summary
  14. From GPUs to Quantum computing - AI Hardware
    1. Computers – an ordinary tale
      1. A brief history
    2. Central Processing Unit
      1. CPU for machine learning
        1. Motherboard
        2. Processor
          1.  Clock speed
          2. Number of cores
          3. Architecture
        3. RAM
        4. HDD and SSD
        5. Operating system (OS)
    3. Graphics Processing Unit (GPU)
      1. GP-GPUs and NVIDIA CUDA
      2. cuDNN
    4.  ASICs, TPUs, and FPGAs
      1. ASIC
      2. TPU
        1. Systolic array
      3. Field-programmable gate arrays
    5. Quantum computers
      1. Can we really build a quantum computer?
      2. How far are we from the quantum era?
    6. Summary
  15. TensorFlow Serving
    1. What is TensorFlow Serving?
      1. Understanding the basics of TensorFlow Serving
        1. Servables
        2. Servable versions
        3. Models
        4. Sources
        5. Loaders
        6. Aspired versions
        7. Managers
    2. Installing and running TensorFlow Serving
      1. Virtual machines
      2. Containers
      3. Installation using Docker Toolbox
    3. Operations for model serving
      1. Model creation
      2. Saving the model
      3. Serving a model
    4. What is gRPC?
      1. Calling the model server
      2. Running the model from the client side
    5. Summary
  16. AI Applications in Healthcare
    1. The current status of AI in healthcare
    2. The challenges to AI in healthcare
    3. The applications of AI in healthcare 
      1. Disease identification – breast cancer
        1. Dataset
        2. Exploratory data analysis (EDA)
        3. Feature selection
        4. Building a classifier
          1. TensorFlow Estimators
          2. DNN using TensorFlow
      2. Human activity recognition
        1. Dataset
          1. Sensor signals
        2. Feature extraction
        3. Exploratory data analysis
        4. Data preparation
        5. Classifier design
        6. Classifier training
    4. Summary
    5. References
  17. AI Applications in Business
    1. AI applications in business
    2. Blockchain
      1. Centralized ledger
      2. Distributed or decentralized ledger
      3. Miners
        1. Bitcoin
    3. Blockchain and AI
      1. Blockchain and AI use cases
        1. Open market for data
        2. Large-scale data management mechanism
        3. More trustworthy AI modeling and predictions
        4. Control over the usage of data and models
    4. Algorithmic trading
      1. Cryptocurrency price prediction
        1. Dataset
        2. Simple lag model for Bitcoin price prediction
        3. LSTM for Bitcoin price prediction
          1. Pre-processing data 
          2. Building the LSTM classifier
          3. Training the LSTM classifier
    5. Fraud detection
      1.  Credit card fraud detection using autoencoders
        1. AEs
        2. Anomaly detection using AEs
          1. Dataset
          2. AE architecture
          3. Training the AE
    6. Risk management
      1. Credit card default detection
        1. Dataset
        2. Building the classifier
        3. Classifier training
    7. Summary
  18. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think