𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

PyTorch Pocket Reference: Building and Deploying Deep Learning Models

✍ Scribed by Joe Papa


Publisher
O'Reilly Media
Year
2021
Tongue
English
Leaves
310
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


This concise, easy-to-use reference puts one of the most popular frameworks for deep learning research and development at your fingertips. Author Joe Papa provides instant access to syntax, design patterns, and code examples to accelerate your development and reduce the time you spend searching for answers.

Research scientists, machine learning engineers, and software developers will find clear, structured PyTorch code that covers every step of neural network development-from loading data to customizing training loops to model optimization and GPU/TPU acceleration. Quickly learn how to deploy your code to production using AWS, Google Cloud, or Azure and deploy your ML models to mobile and edge devices.

β€’ Learn basic PyTorch syntax and design patterns
β€’ Create custom models and data transforms
β€’ Train and deploy models using a GPU and TPU
β€’ Train and test a deep learning classifier
β€’ Accelerate training using optimization and distributed training
β€’ Access useful PyTorch libraries and the PyTorch ecosystem

✦ Table of Contents


Cover
Copyright
Table of Contents
Preface
Who Should Read This Book
Why I Wrote This Book
Navigating This Book
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. An Introduction to PyTorch
What Is PyTorch?
Why Use PyTorch?
Getting Started
Running in Google Colaboratory
Running on a Local Computer
Running on Cloud Platforms
Verifying Your PyTorch Environment
A Fun Example
Chapter 2. Tensors
What Is a Tensor?
Simple CPU Example
Simple GPU Example
Moving Tensors Between CPUs and GPUs
Creating Tensors
Tensor Attributes
Data Types
Creating Tensors from Random Samples
Creating Tensors Like Other Tensors
Tensor Operations
Indexing, Slicing, Combining, and Splitting Tensors
Tensor Operations for Mathematics
Automatic Differentiation (Autograd)
Chapter 3. Deep Learning Development with PyTorch
The Overall Process
Data Preparation
Data Loading
Data Transforms
Data Batching
General Data Preparation (torch.utils.data)
Model Development
Model Design
Training
Validation
Testing
Model Deployment
Saving Models
Deploying to PyTorch Hub
Deploying to Production
Chapter 4. Neural Network Development Reference Designs
Image Classification with Transfer Learning
Data Processing
Model Design
Training and Validation
Testing and Deployment
Sentiment Analysis with Torchtext
Data Processing
Model Design
Training and Validation
Testing and Deployment
Generative Learningβ€”Generating Fashion-MNIST Images with DCGAN
Data Processing
Model Design
Training
Testing and Deployment
Chapter 5. Customizing PyTorch
Custom Layers and Activations
Custom Layer Example (Complex Linear)
Custom Activation Example (Complex ReLU)
Custom Model Architectures
Custom Loss Functions
Custom Optimizer Algorithms
Custom Training, Validation, and Test Loops
Chapter 6. PyTorch Acceleration and Optimization
PyTorch on a TPU
PyTorch on Multiple GPUs (Single Machine)
Data Parallel Processing
Model Parallel Processing
Combined Data Parallel Processing and Model Parallel Processing
Distributed Training (Multiple Machines)
Model Optimization
Hyperparameter Tuning
Quantization
Pruning
Chapter 7. Deploying PyTorch to Production
PyTorch Deployment Tools and Libraries
Common Example Model
Python API
TorchScript
TorchServe
ONNX
Mobile Libraries
Deploying to a Flask App
Colab Flask App
Deploying to the Cloud with TorchServe
Quick Start with Docker
Deploying to Mobile and Edge
iOS
Android
Other Edge Devices
Chapter 8. The PyTorch Ecosystem and Additional Resources
The PyTorch Ecosystem
Torchvision for Image and Video
Datasets and I/O
Models
Transforms, Operations, and Utilities
Torchtext for NLP
Create a Dataset Object
Preprocess Data
Create a Dataloader for Batching
Data (torchtext.data)
Datasets (torchtext.datasets)
Vocabularies (torchtext.vocab)
TensorBoard for Visualization
Learning Curves with SCALARS
Model Architectures with GRAPHS
Data with IMAGES, TEXT, and PROJECTOR
Weight Distributions with DISTRIBUTIONS and HISTOGRAMS
Hyperparameters with HPARAMS
The TensorBoard API
Papers with Code
Additional PyTorch Resources
Tutorials
Books
Online Courses and Live Training
Index

✦ Subjects


Neural Networks; Deep Learning; Natural Language Processing; Python; Generative Adversarial Networks; Transfer Learning; Sentiment Analysis; Docker; Optimization; Flask; PyTorch; Image Classification; Loss Functions; Google Colaboratory; TensorBoard; Tensor Calculus; Data Preparation; Model Deployment; TorchServe; Torchtext


πŸ“œ SIMILAR VOLUMES


PyTorch Pocket Reference: Building and D
✍ Joe Papa πŸ“‚ Library πŸ“… 2021 πŸ› O'Reilly Media 🌐 English

<div><p>This concise, easy-to-use reference puts one of the most popular frameworks for deep learning research and development at your fingertips. Author Joe Papa provides instant access to syntax, design patterns, and code examples to accelerate your development and reduce the time you spend search

TensorFlow 2 Pocket Reference: Building
✍ KC Tung πŸ“‚ Library πŸ“… 2021 πŸ› O'Reilly Media 🌐 English

This easy-to-use reference for TensorFlow 2 design patterns in Python will help you make informed decisions for various use cases. Author KC Tung addresses common topics and tasks in enterprise data science and machine learning practices rather than focusing on TensorFlow itself. When and why wou

TensorFlow 2 Pocket Reference: Building
✍ KC Tung πŸ“‚ Library πŸ“… 2021 πŸ› O'Reilly Media 🌐 English

<div><p>This easy-to-use reference for TensorFlow 2 design patterns in Python will help you make informed decisions for various use cases. Author KC Tung addresses common topics and tasks in enterprise data science and machine learning practices rather than focusing on TensorFlow itself.</p><p>When

Programming PyTorch for Deep Learning: C
✍ Ian Pointer πŸ“‚ Library πŸ“… 2019 πŸ› O’Reilly Media 🌐 English

Take the next steps toward mastering deep learning, the machine learning method that’s transforming the world around us by the second. In this practical book, you’ll get up to speed on key ideas using Facebook’s open source PyTorch framework and gain the latest skills you need to create your very ow

Programming PyTorch for Deep Learning: C
✍ Ian Pointer πŸ“‚ Library πŸ“… 2019 πŸ› O'Reilly Media 🌐 English

Take the next steps toward mastering deep learning, the machine learning method that’s transforming the world around us by the second. In this practical book, you’ll get up to speed on key ideas using Facebook’s open source PyTorch framework and gain the latest skills you need to create your very ow

Programming Pytorch for Deep Learning: C
✍ Pointer, Ian πŸ“‚ Library πŸ“… 2019 πŸ› O'Reilly Media 🌐 English

Take the next steps toward mastering deep learning, the machine learning method that's transforming the world around us by the second. In this practical book, you'll get up to speed on key ideas using Facebook's open source PyTorch framework and gain the latest skills you need to create your very ow