AI & ML · Ebook
PyTorch: Deep Learning the Pythonic Way
by Shriira Press
4.7(7,099)93 pagesPublished 2026
A comprehensive, self-contained guide to PyTorch, the deep-learning framework that powers most modern AI research and a great deal of production. PyTorch's appeal is that it feels like Python and NumPy with gradients and a GPU — you write ordinary code, and the framework differentiates it. This book teaches that style end to end: tensors and autograd, the nn.Module abstraction, the explicit training loop that is PyTorch's signature, Dataset/DataLoader input pipelines, CNNs and transformers, transfer learning, and deployment with TorchScript, torch.compile, ONNX, and ExecuTorch. It blends intuition, the concepts behind the API, and runnable code.
Contents
- 1Preface
- 2Chapter 1 — What Is PyTorch?
- 3Chapter 2 — Tensors and Autograd
- 4Chapter 3 — Your First Neural Network
- 5Chapter 4 — Building Models with nn.Module
- 6Chapter 5 — The Training Loop in Depth
- 7Chapter 6 — Data: Datasets, DataLoaders, and Transforms
- 8Chapter 7 — Layers, Activations, and Building Blocks
- 9Chapter 8 — Convolutional Networks for Images
- 10Chapter 9 — Sequence Models: RNNs, LSTMs, and Transformers
- 11Chapter 10 — Regularization, Tuning, and Training Tricks
- 12Chapter 11 — Transfer Learning and Pretrained Models
- 13Chapter 12 — Saving, Compiling, and Deployment
- 14Chapter 13 — The Ecosystem, Scaling, and the Profession
- 15Appendix A — Glossary and API Quick Reference
- 16Appendix B — Further Reading and Resources
