All the chapters (except Chapter 1, Getting Started with Deep Learning Using PyTorch and Chapter 9, What Next) have associated Jupyter Notebooks in the book's GitHub repository. The imports required for the code to run may not be included in the text to save space. You should be able to run all of the code from the Notebooks.
The book focuses on practical illustrations, so run the Jupyter Notebooks as you read the chapters.
Access to a computer with a GPU will help run the code quickly. There are companies such as paperspace.com and www.crestle.com that abstract a lot of the complexity required to run deep learning algorithms.