The Deep Learning with PyTorch Workshop
eBook - ePub

The Deep Learning with PyTorch Workshop

Build deep neural networks and artificial intelligence applications with PyTorch

Hyatt Saleh

  1. 330 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

The Deep Learning with PyTorch Workshop

Build deep neural networks and artificial intelligence applications with PyTorch

Hyatt Saleh

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Get a head start in the world of AI and deep learning by developing your skills with PyTorch

Key Features

  • Learn how to define your own network architecture in deep learning
  • Implement helpful methods to create and train a model using PyTorch syntax
  • Discover how intelligent applications using features like image recognition and speech recognition really process your data

Book Description

Want to get to grips with one of the most popular machine learning libraries for deep learning? The Deep Learning with PyTorch Workshop will help you do just that, jumpstarting your knowledge of using PyTorch for deep learning even if you're starting from scratch.

It's no surprise that deep learning's popularity has risen steeply in the past few years, thanks to intelligent applications such as self-driving vehicles, chatbots, and voice-activated assistants that are making our lives easier. This book will take you inside the world of deep learning, where you'll use PyTorch to understand the complexity of neural network architectures.

The Deep Learning with PyTorch Workshop starts with an introduction to deep learning and its applications. You'll explore the syntax of PyTorch and learn how to define a network architecture and train a model. Next, you'll learn about three main neural network architectures - convolutional, artificial, and recurrent - and even solve real-world data problems using these networks. Later chapters will show you how to create a style transfer model to develop a new image from two images, before finally taking you through how RNNs store memory to solve key data issues.

By the end of this book, you'll have mastered the essential concepts, tools, and libraries of PyTorch to develop your own deep neural networks and intelligent apps.

What you will learn

  • Explore the different applications of deep learning
  • Understand the PyTorch approach to building neural networks
  • Create and train your very own perceptron using PyTorch
  • Solve regression problems using artificial neural networks (ANNs)
  • Handle computer vision problems with convolutional neural networks (CNNs)
  • Perform language translation tasks using recurrent neural networks (RNNs)

Who this book is for

This deep learning book is ideal for anyone who wants to create and train deep learning models using PyTorch. A solid understanding of the Python programming language and its packages will help you grasp the topics covered in the book more quickly.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es The Deep Learning with PyTorch Workshop un PDF/ePUB en línea?
Sí, puedes acceder a The Deep Learning with PyTorch Workshop de Hyatt Saleh en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in Python. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2020
ISBN
9781838981846
Edición
1

1. Introduction to Deep Learning and PyTorch

Overview
This chapter introduces the two main topics of this book: deep learning and PyTorch. Here, you will be able to explore some of the most popular applications of deep learning, understand what PyTorch is, and use PyTorch to build a single-layer network, which will be the starting point for you to apply your learning to real-life data problems. By the end of this chapter, you will be able to use PyTorch's syntax to build neural networks, which will be essential in subsequent chapters.

Introduction

Deep learning is a subset of machine learning that focuses on using neural networks to solve complex data problems. It is becoming increasingly popular nowadays, thanks to advances in software and hardware that allow us to gather and process large amounts of data (we are talking about millions and billions of entries). This is important considering that deep neural networks require vast amounts of data to perform well.
Some of the most well-known applications of deep learning are self-driving vehicles, popular chatbots, and a wide variety of voice-activated assistants, which will be further explained in this chapter.
PyTorch was launched back in 2017, and its main characteristic is that it uses graphics processing units (GPUs) to process data using "tensors". This allows algorithms to run at high speeds and, at the same time, it provides its users with flexibility and a standard syntax to obtain the best results for many data problems. Furthermore, PyTorch uses dynamic computational graphs that allow you to make changes to the network on the go. This book demystifies neural networks using PyTorch and helps you understand the complexity of neural network architectures.

Why Deep Learning?

In this section, we will cover the importance of deep learning and the reasons for its popularity.
Deep learning is a subset of machine learning that uses multi-layer neural networks (large neural networks), inspired by the biological structure of the human brain, where neurons in a layer receive some input data, process it, and send the output to the following layer. These neural networks can consist of thousands of interconnected nodes (neurons), mostly organized in different layers, where one node is connected to several nodes in the previous layer from where it receives its input data, as well as being connected to several nodes in the following layer, to which it sends the output data after it has been processed.
Deep learning's popularity is due to its accuracy. It has achieved higher accuracy levels than other algorithms have ever before for complex data problems such as natural language processing (NLP). Deep learning's ability to perform outstandingly well has reached levels where machines can outperform humans, such as in the case of fraud detection. Deep learning models can not only optimize processes but also improve their quality. This has meant advances in revolutionary fields where accuracy is vital for safety reasons, such as self-driven cars.
Even though neural networks were theorized decades ago, there are two main reasons why they have recently become popular:
  • Neural networks require, and actually capitalize on, vast amounts of labeled data to achieve an optimal solution. This means that for the algorithm to create an outstanding model, it requires hundreds of thousands or even millions of entries, containing both the features and the target values. For instance, as regards the image recognition of cats, the more images you have, the more features the model is able to detect, which makes it better.
    Note
    Labeled data refers to data that contains a set of features (characteristics that describe an instance) and a target value (the value to be achieved); for example, a dataset containing demographical and financial information, with a target feature that determines the wage of a person.
    The following plot shows the performance of deep learning against other algorithms in terms of the quantity of data:
Figure 1.1: Performance of deep learning against other algorithms
Figure 1.1: Performance of deep learning against other algorithms
This is possible nowadays thanks to advances in software and hardware that allow us to gather and process such granularity.
  • Neural networks require considerable computing power to be able to process such large amounts of data without taking weeks (or even longer) to be trained. Because the process of achieving the best possible model is based on trial and error, it is necessary to be able to run the training process as efficiently as possible.
    This can be achieved today through the use of GPUs, which can cut down the training time of a neural network from weeks to hours.
    Note
    With the objective of accelerating deep learning in order to be able to make use of large amounts of training data and construct state-of-the-art models, field-programmable gate arrays (FPGAs) and tensor processing units (TPUs) are being developed by major cloud computing providers, such as AWS, Microsoft Azure, and Google.

Applications of Deep Learning

Deep learning is revolutionizing technology and is already impacting our lives. Deep learning can be applied to a wide variety of situations, ranging from medical and safety (such as fraud detection) purposes to more trivial tasks, such as colorizing black and white images or translating text in real time.
Some of the applications of deep learning that are either under development or in use today include the following:
  • Self-driving vehicles: Several companies, such as Google, have been working on the development of partially or totally self-driving vehicles that learn to drive by using digital sensors to identify the objects around them.
  • Medical diagnosis: Deep learning is impacting this industry by improving the diagnosis accuracy of terminal diseases such as brain and breast cancer. This is done by classifying X-rays (or any other diagnostic imagery mechanisms) of new patients, based on labeled X-rays from previous patients that did or did not have cancer.
  • Voice assistants: This may be one of the most popular applications nowadays, due to the proliferation of different voice-activated intelligent assistants, such as Apple's Siri, Google Home, and Amazon's Alexa.
  • Automatic text generation: This means generating new text based on an input sentence. This is popularly used in email writing, where the email provider suggests the next couple of words to the user, based on the text that's already been written.
  • Advertising: In the commercial world, deep learning is helping to increase the return on investment of advertising campaigns by targeting the right audiences and by creating more effective ads. One example of this is the generation of content in order to produce up-to-date and informative blogs that help to engage current customers and attract new ones.
  • Price forecasting: For beginners, this is a typical example of what can be achieved through the use of machine learning algorithms. Price forecasting consists of training a model based on real data. For instance, in the field of real estate, this would consist of feeding a model with property characteristics and their final price in order to be able to predict the prices of future entries based solely on property characteristics.

Introduction to PyTorch

PyTorch is an open source library developed mainly by Facebook's artificial intelligence research group as a Python version of Torch.
Note
Torch is an open source, scientific computing framework that supports a wide variety of machine learning algorithms.
PyTorch was first released to the public in January 2017. It uses the power of GPUs to speed up the computation of tensors, which accelerates the training times of complex models.
The library has a C++ backend, combined with the deep learning framework of Torch, which allows much faster computations than native Python libraries with many deep learning features. The frontend is in Python, which has helped it gain popularity, enabling data scientists new to the library to construct complex neural networks. It is possible to use PyTorch alongside other popular Python packages.
Although the PyTorch is fairly new, it has gained popularity quickly as it was developed using feedback from many experts in the field. This has led PyTorch to become a useful library for users.

GPUs in PyTorch

GPUs were originally developed to speed up computation...

Índice

  1. The Deep Learning with PyTorch Workshop
  2. Preface
  3. 1. Introduction to Deep Learning and PyTorch
  4. 2. Building Blocks of Neural Networks
  5. 3. A Classification Problem Using DNN
  6. 4. Convolutional Neural Networks
  7. 5. Style Transfer
  8. 6. Analyzing the Sequence of Data with RNNs
  9. Appendix
Estilos de citas para The Deep Learning with PyTorch Workshop

APA 6 Citation

Saleh, H. (2020). The Deep Learning with PyTorch Workshop (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/1694586/the-deep-learning-with-pytorch-workshop-build-deep-neural-networks-and-artificial-intelligence-applications-with-pytorch-pdf (Original work published 2020)

Chicago Citation

Saleh, Hyatt. (2020) 2020. The Deep Learning with PyTorch Workshop. 1st ed. Packt Publishing. https://www.perlego.com/book/1694586/the-deep-learning-with-pytorch-workshop-build-deep-neural-networks-and-artificial-intelligence-applications-with-pytorch-pdf.

Harvard Citation

Saleh, H. (2020) The Deep Learning with PyTorch Workshop. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/1694586/the-deep-learning-with-pytorch-workshop-build-deep-neural-networks-and-artificial-intelligence-applications-with-pytorch-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Saleh, Hyatt. The Deep Learning with PyTorch Workshop. 1st ed. Packt Publishing, 2020. Web. 14 Oct. 2022.