Book description
Every other day we hear about new ways to put deep learning to good use: improved medical imaging, accurate credit card fraud detection, long range weather forecasting, and more. PyTorch puts these superpowers in your hands, providing a comfortable Python experience that gets you started quickly and then grows with you as you—and your deep learning skills—become more sophisticated. Deep Learning with PyTorch will make that journey engaging and fun.About the Technology
Although many deep learning tools use Python, the PyTorch library is truly Pythonic. Instantly familiar to anyone who knows PyData tools like NumPy and scikit-learn, PyTorch simplifies deep learning without sacrificing advanced features. It's excellent for building quick models, and it scales smoothly from laptop to enterprise. Because companies like Apple, Facebook, and JPMorgan Chase rely on PyTorch, it's a great skill to have as you expand your career options. It's easy to get started with PyTorch. It minimizes cognitive overhead without sacrificing the access to advanced features, meaning you can focus on what matters the most - building and training the latest and greatest deep learning models and contribute to making a dent in the world. PyTorch is also a snap to scale and extend, and it partners well with other Python tooling. PyTorch has been adopted by hundreds of deep learning practitioners and several first-class players like FAIR, OpenAI, FastAI and Purdue.
About the Book
Deep Learning with PyTorch teaches you to create neural networks and deep learning systems with PyTorch. This practical book quickly gets you to work building a real-world example from scratch: a tumor image classifier. Along the way, it covers best practices for the entire DL pipeline, including the PyTorch Tensor API, loading data in Python, monitoring training, and visualizing results. After covering the basics, the book will take you on a journey through larger projects. The centerpiece of the book is a neural network designed for cancer detection. You'll discover ways for training networks with limited inputs and start processing data to get some results. You'll sift through the unreliable initial results and focus on how to diagnose and fix the problems in your neural network. Finally, you'll look at ways to improve your results by training with augmented data, make improvements to the model architecture, and perform other fine tuning.
What's Inside
- Training deep neural networks
- Implementing modules and loss functions
- Utilizing pretrained models from PyTorch Hub
- Exploring code samples in Jupyter Notebooks
About the Reader
For Python programmers with an interest in machine learning.
About the Authors
Eli Stevens had roles from software engineer to CTO, and is currently working on machine learning in the self-driving-car industry. Luca Antiga is cofounder of an AI engineering company and an AI tech startup, as well as a former PyTorch contributor. Thomas Viehmann is a PyTorch core developer and machine learning trainer and consultant.
Quotes
With this publication, we finally have a definitive treatise on PyTorch. It covers the basics and abstractions in great detail.
- From the Foreword by Soumith Chintala, Cocreator of PyTorch
Deep learning divided into digestible chunks with code samples that build up logically.
- Mathieu Zhang, NVIDIA
Timely, practical, and thorough. Don’t put it on your bookshelf, but next to your laptop.
- Philippe Van Bergen, PC Consulting
Deep Learning with PyTorch offers a very pragmatic overview of deep learning. It is a didactical resource.
- Orlando Alejo Mendez Morales, Experian
Publisher resources
Table of contents
- Copyright
- dedication
- contents
- front matter
- Part 1. Core PyTorch
- 1 Introducing deep learning and the PyTorch Library
- 2 Pretrained networks
-
3 It starts with a tensor
- 3.1 The world as floating-point numbers
- 3.2 Tensors: Multidimensional arrays
- 3.3 Indexing tensors
- 3.4 Named tensors
- 3.5 Tensor element types
- 3.6 The tensor API
- 3.7 Tensors: Scenic views of storage
- 3.8 Tensor metadata: Size, offset, and stride
- 3.9 Moving tensors to the GPU
- 3.10 NumPy interoperability
- 3.11 Generalized tensors are tensors, too
- 3.12 Serializing tensors
- 3.13 Conclusion
- 3.14 Exercises
- 3.15 Summary
- 4 Real-world data representation using tensors
- 5 The mechanics of learning
- 6 Using a neural network to fit the data
- 7 Telling birds from airplanes: Learning from images
- 8 Using convolutions to generalize
- Part 2. Learning from images in the real world: Early detection of lung cancer
- 9 Using PyTorch to fight cancer
- 10 Combining data sources into a unified dataset
-
11 Training a classification model to detect suspected tumors
- 11.1 A foundational model and training loop
- 11.2 The main entry point for our application
- 11.3 Pretraining setup and initialization
- 11.4 Our first-pass neural network design
- 11.5 Training and validating the model
- 11.6 Outputting performance metrics
- 11.7 Running the training script
- 11.8 Evaluating the model: Getting 99.7% correct means we’re done, right?
- 11.9 Graphing training metrics with TensorBoard
- 11.10 Why isn’t the model learning to detect nodules?
- 11.11 Conclusion
- 11.12 Exercises
- 11.13 Summary
-
12 Improving training with metrics and augmentation
- 12.1 High-level plan for improvement
- 12.2 Good dogs vs. bad guys: False positives and false negatives
- 12.3 Graphing the positives and negatives
- 12.4 What does an ideal dataset look like?
- 12.5 Revisiting the problem of overfitting
- 12.6 Preventing overfitting with data augmentation
- 12.7 Conclusion
- 12.8 Exercises
- 12.9 Summary
-
13 Using segmentationto find suspected nodules
- 13.1 Adding a second model to our project
- 13.2 Various types of segmentation
- 13.3 Semantic segmentation: Per-pixel classification
- 13.4 Updating the model for segmentation
-
13.5 Updating the dataset for segmentation
- 13.5.1 U-Net has very specific input size requirements
- 13.5.2 U-Net trade-offs for 3D vs. 2D data
- 13.5.3 Building the ground truth data
- 13.5.4 Implementing Luna2dSegmentationDataset
- 13.5.5 Designing our training and validation data
- 13.5.6 Implementing TrainingLuna2dSegmentationDataset
- 13.5.7 Augmenting on the GPU
- 13.6 Updating the training script for segmentation
- 13.7 Results
- 13.8 Conclusion
- 13.9 Exercises
- 13.10 Summary
-
14 End-to-end nodule analysis, and where to go next
- 14.1 Towards the finish line
- 14.2 Independence of the validation set
- 14.3 Bridging CT segmentation and nodule candidate classification
- 14.4 Quantitative validation
- 14.5 Predicting malignancy
- 14.6 What we see when we diagnose
- 14.7 What next? Additional sources of inspiration (and data)
- 14.8 Conclusion
- 14.9 Exercises
- 14.10 Summary
- Part 3. Deployment
- 15 Deploying to production
- index
Product information
- Title: Deep Learning with PyTorch
- Author(s):
- Release date: July 2020
- Publisher(s): Manning Publications
- ISBN: 9781617295263
You might also like
book
Deep Learning with PyTorch
Build neural network models in text, vision and advanced analytics using PyTorch About This Book Learn …
book
Generative Deep Learning
Generative modeling is one of the hottest topics in AI. It’s now possible to teach a …
book
Grokking Deep Learning
Grokking Deep Learning teaches you to build deep learning neural networks from scratch! In his engaging …
video
Deep Learning with TensorFlow, Keras, and PyTorch
7+ Hours of Video Instruction An intuitive, application-focused introduction to deep learning and TensorFlow, Keras, and …