Book Image

PyTorch Deep Learning Hands-On

By : Sherin Thomas, Sudhanshu Passi
Book Image

PyTorch Deep Learning Hands-On

By: Sherin Thomas, Sudhanshu Passi

Overview of this book

PyTorch Deep Learning Hands-On is a book for engineers who want a fast-paced guide to doing deep learning work with PyTorch. It is not an academic textbook and does not try to teach deep learning principles. The book will help you most if you want to get your hands dirty and put PyTorch to work quickly. PyTorch Deep Learning Hands-On shows how to implement the major deep learning architectures in PyTorch. It covers neural networks, computer vision, CNNs, natural language processing (RNN), GANs, and reinforcement learning. You will also build deep learning workflows with the PyTorch framework, migrate models built in Python to highly efficient TorchScript, and deploy to production using the most sophisticated available tools. Each chapter focuses on a different area of deep learning. Chapters start with a refresher on how the model works, before sharing the code you need to implement it in PyTorch. This book is ideal if you want to rapidly add PyTorch to your deep learning toolset.
Table of Contents (11 chapters)
10
Index

ONNX

The ONNX protocol was built to create interoperability between different frameworks. This helps AI developers and organizations to choose the right framework to develop AI models where they spend most of their time. Once the development and training phases are over, they can migrate the model to any framework of their choice to serve it in production.

Different frameworks could be optimized for different purposes, such as mobile deployment, readability and flexibility, production deployment, and others. Converting the model to different frameworks is sometimes inevitable and manual conversion is time-consuming. This is another use case that ONNX is trying to solve with interoperability.

Let's take any framework example to see where ONNX is going to fit in. The framework will have a language API, which is used by developers, then a graph representation of the model developed by them. This IR then goes to the highly optimized runtime for execution. ONNX provides a unified standard...