Deep Learning with PyTorch Quick Start Guide

Book description

Introduction to deep learning and PyTorch by building a convolutional neural network and recurrent neural network for real-world use cases such as image classification, transfer learning, and natural language processing.

Key Features

  • Clear and concise explanations
  • Gives important insights into deep learning models
  • Practical demonstration of key concepts

Book Description

PyTorch is extremely powerful and yet easy to learn. It provides advanced features, such as supporting multiprocessor, distributed, and parallel computation. This book is an excellent entry point for those wanting to explore deep learning with PyTorch to harness its power.

This book will introduce you to the PyTorch deep learning library and teach you how to train deep learning models without any hassle. We will set up the deep learning environment using PyTorch, and then train and deploy different types of deep learning models, such as CNN, RNN, and autoencoders.

You will learn how to optimize models by tuning hyperparameters and how to use PyTorch in multiprocessor and distributed environments. We will discuss long short-term memory network (LSTMs) and build a language model to predict text.

By the end of this book, you will be familiar with PyTorch's capabilities and be able to utilize the library to train your neural networks with relative ease.

What you will learn

  • Set up the deep learning environment using the PyTorch library
  • Learn to build a deep learning model for image classification
  • Use a convolutional neural network for transfer learning
  • Understand to use PyTorch for natural language processing
  • Use a recurrent neural network to classify text
  • Understand how to optimize PyTorch in multiprocessor and distributed environments
  • Train, optimize, and deploy your neural networks for maximum accuracy and performance
  • Learn to deploy production-ready models

Who this book is for

Developers and Data Scientist familiar with Machine Learning but new to deep learning, or existing practitioners of deep learning who would like to use PyTorch to train their deep learning models will find this book to be useful. Having knowledge of Python programming will be an added advantage, while previous exposure to PyTorch is not needed.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Deep Learning with PyTorch Quick Start Guide
  3. About Packt
    1. Why subscribe?
  4. Contributors
    1. About the author
    2. About the reviewer
    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. Introduction to PyTorch
    1. What is PyTorch?
    2. Installing PyTorch
      1. Digital Ocean
        1. Tunneling in to IPython
      2. Amazon Web Services (AWS)
    3. Basic PyTorch operations
      1. Default value initialization
      2. Converting between tensors and NumPy arrays
      3. Slicing and indexing and reshaping
      4. In place operations
    4. Loading data
      1. PyTorch dataset loaders
        1. Displaying an image
        2. DataLoader
        3. Creating a custom dataset
        4. Transforms
      2. ImageFolder
      3. Concatenating datasets
    5. Summary
  7. Deep Learning Fundamentals
    1.  Approaches to machine learning
    2. Learning tasks
      1. Unsupervised learning
        1. Clustering
        2. Principle component analysis
        3. Reinforcement learning
      2. Supervised learning
        1. Classification
        2. Evaluating classifiers
    3. Features
      1. Handling text and categories
    4. Models
      1. Linear algebra review
      2. Linear models
        1. Gradient descent
        2. Multiple features
        3. The normal equation
        4. Logistic regression
        5. Nonlinear models
    5. Artificial neural networks
      1. The perceptron
    6. Summary
  8. Computational Graphs and Linear Models
    1. autograd
      1. Computational graphs
    2. Linear models
      1. Linear regression in PyTorch
      2. Saving models
      3. Logistic regression
        1. Activation functions in PyTorch
    3. Multi-class classification example
    4. Summary
  9. Convolutional Networks
    1. Hyper-parameters and multilayered networks
    2. Benchmarking models
    3. Convolutional networks
      1. A single convolutional layer
        1. Multiple kernels
      2. Multiple convolutional layers
        1. Pooling layers
        2. Building a single-layer CNN
        3. Building a multiple-layer CNN
          1. Batch normalization
    4. Summary
  10. Other NN Architectures
    1. Introduction to recurrent networks
      1. Recurrent artificial neurons 
      2. Implementing a recurrent network
    2. Long short-term memory networks
      1. Implementing an LSTM
      2. Building a language model with a gated recurrent unit
    3. Summary
  11. Getting the Most out of PyTorch
    1. Multiprocessor and distributed environments
      1. Using a GPU
      2. Distributed environments
        1. torch.distributed
        2. torch.multiprocessing
    2. Optimization techniques
      1. Optimizer algorithms
      2. Learning rate scheduler
      3. Parameter groups
    3. Pretrained models
      1. Implementing a pretrained model
    4. Summary
  12. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Deep Learning with PyTorch Quick Start Guide
  • Author(s): David Julian
  • Release date: December 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789534092