Chapter 3. Deep Learning Development with PyTorch
Now that you have your development environment running and a good understanding of tensors and their operations, we can start developing and deploying deep learning models with PyTorch. This chapter provides a quick reference to the basic NN development process and the PyTorch code needed to execute it.
First we’ll review the overall process, then we’ll dive into each stage and look at some sample PyTorch code that implements each function. We’ll build off what you learned in Chapter 2 to load your data into tensors and apply data transforms that convert your tensors to suitable inputs for your model.
You’ll build a deep learning model and train the model using a common training loop structure. Then, you’ll test your model’s performance and tweak hyperparameters to improve your results and training speed. Finally, we’ll explore ways to deploy your model to prototype systems or production. At each stage, I’ll provide commonly used PyTorch code for you to use as a reference as you develop your own deep learning models.
Future chapters in this book will provide additional examples and cover more advanced topics, such as customization, optimization, acceleration, distributed training, and advanced deployment. For now, we’ll focus on the basic NN development process.
The Overall Process
Although everyone builds their deep learning models in a different way, the overall process is pretty much the same. Regardless of whether you are ...
Get PyTorch Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.