Deep Learning with fastai Cookbook
eBook - ePub

Deep Learning with fastai Cookbook

Mark Ryan

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

Deep Learning with fastai Cookbook

Mark Ryan

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Harness the power of the easy-to-use, high-performance fastai framework to rapidly create complete deep learning solutions with few lines of codeKey Features• Discover how to apply state-of-the-art deep learning techniques to real-world problems• Build and train neural networks using the power and flexibility of the fastai framework• Use deep learning to tackle problems such as image classification and text classificationBook Descriptionfastai is an easy-to-use deep learning framework built on top of PyTorch that lets you rapidly create complete deep learning solutions with as few as 10 lines of code. Both predominant low-level deep learning frameworks, TensorFlow and PyTorch, require a lot of code, even for straightforward applications. In contrast, fastai handles the messy details for you and lets you focus on applying deep learning to actually solve problems. The book begins by summarizing the value of fastai and showing you how to create a simple 'hello world' deep learning application with fastai. You'll then learn how to use fastai for all four application areas that the framework explicitly supports: tabular data, text data (NLP), recommender systems, and vision data. As you advance, you'll work through a series of practical examples that illustrate how to create real-world applications of each type. Next, you'll learn how to deploy fastai models, including creating a simple web application that predicts what object is depicted in an image. The book wraps up with an overview of the advanced features of fastai. By the end of this fastai book, you'll be able to create your own deep learning applications using fastai. You'll also have learned how to use fastai to prepare raw datasets, explore datasets, train deep learning models, and deploy trained models.What you will learn• Prepare real-world raw datasets to train fastai deep learning models• Train fastai deep learning models using text and tabular data• Create recommender systems with fastai• Find out how to assess whether fastai is a good fit for a given problem• Deploy fastai deep learning models in web applications• Train fastai deep learning models for image classificationWho this book is forThis book is for data scientists, machine learning developers, and deep learning enthusiasts looking to explore the fastai framework using a recipe-based approach. Working knowledge of the Python programming language and machine learning basics is strongly recommended to get the most out of this deep learning book.

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 Deep Learning with fastai Cookbook un PDF/ePUB en línea?
Sí, puedes acceder a Deep Learning with fastai Cookbook de Mark Ryan en formato PDF o ePUB, así como a otros libros populares de Informatica y Intelligenza artificiale (IA) e semantica. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9781800209992

Chapter 1: Getting Started with fastai

Over the last decade, deep learning has revolutionized swathes of technology, from image recognition to machine translation. Until recently, only those with extensive training and access to specialized hardware have been able to unlock the benefits of deep learning. The fastai framework is an effort to democratize deep learning by making it accessible to non-specialists. One of the key ways that fastai opens up deep learning to the masses is by making it easy to get started.
In this chapter, we will show you what you need to get started with fastai, starting with how to set up an environment for fastai. By the end of this chapter, you will be able to do the following: set up a cloud environment in which to run fastai examples; exercise a basic fastai example; explain the relationship between fastai and PyTorch (the underlying deep learning library for fastai); and contrast fastai with Keras, the other high-level library for deep learning.
Here are the recipes that will be covered in this chapter:
  • Setting up a fastai environment in Paperspace Gradient
  • Setting up a fastai environment in Google Colaboratory (Google Colab)
  • Setting up JupyterLab environment in Paperspace Gradient
  • "Hello world" for fastai—creating a model for the Modified National Institute of Science and Technology (MNIST) dataset
  • Understanding the world in four applications: tables, text, recommender systems, and images
  • Working with PyTorch tensors
  • Contrasting fastai with Keras
  • Test your knowledge

Technical requirements

For this chapter, you will be using the following technologies:
  • Paperspace Gradient: https://gradient.paperspace.com/
  • Google Colab: https://colab.research.google.com/notebooks/intro.ipynb
  • Google Drive: https://drive.google.com
  • Keras: https://keras.io/
You can find the code referred to in this chapter at the following link:
https://github.com/PacktPublishing/Deep-Learning-with-fastai-Cookbook/tree/main/ch1

Setting up a fastai environment in Paperspace Gradient

There are two free cloud environments that you can use to explore fastai: Paperspace Gradient and Google Colab. In this section, we'll go through the steps to set up Paperspace Gradient with a fastai notebook environment, and in the next section, we'll go through the setup steps for Colab. It's your choice, so pick the environment that works best for you.
Gradient is simpler to use because you have access to a standard filesystem for storage. With Colab, you need to use Google Drive for storage and, unlike Gradient, you don't have convenient access to the terminal for command-line interactions.
On the other hand, Colab gives you direct access to a wider set of libraries beyond those needed for fastai—for example, you can run the Keras MNIST example in Colab but it won't work off the shelf in a Gradient fastai instance. To get the most out of the examples in the book, it's best to set up both environments so that you can choose which one works best for you as you go along. We'll start with Gradient, since it is the simplest to get started with.

Getting ready

Prior to setting up Gradient for fastai, you need to create a Paperspace account. You can do this by going to https://console.paperspace.com/signup?gradient=true.

How to do it…

Once you have a Paperspace account, you can create a free fastai notebook in Gradient by following these steps to create a fastai notebook instance in Gradient. Once created, this will be a complete Jupyter Notebook environment with all the libraries that you need (including fastai, PyTorch, and related libraries).
  1. Go to the Paperspace site and sign in using the account you created in the Getting ready section.
  2. From the pulldown at the top of the page, select Gradient:
    Figure 1.1. – Selecting gradient from the pulldown
    Figure 1.1. – Selecting gradient from the pulldown
  3. Select the Notebooks tab:
    Figure 1.2 – Selecting the Notebooks tab
    Figure 1.2 – Select the Notebooks tab
  4. Select the CREATE button.
    Figure 1.3 – CREATE button
    Figure 1.3 – CREATE button
  5. Enter a name for your notebook in the Name field.
  6. In the Select a runtime section, select fastai.
  7. In the Select a machine section, select Free-GPU or Free-P5000. Note that you may receive a message indicating out of capacity for the machine type you selected. If this happens, you can either choose another GPU-enabled machine type or wait a few minutes and try again with your original machine type. Also note that after your notebook is created, you can change the machine type—for example, if you find that the free instance is not meeting your needs, you can switch your notebook to a paid machine. You can also define multiple notebooks for different applications and configure auto-shutdown (how many hours your instance will run before shutting itself down) if you opt for a paid subscription. For details, see https://console.paperspace.com/teim6pi2i/upgrade.
  8. Select the START NOTEBOOK button to launch t...

Índice

  1. Deep Learning with fastai Cookbook
  2. Contributors
  3. Preface
  4. Chapter 1: Getting Started with fastai
  5. Chapter 2: Exploring and Cleaning Up Data with fastai
  6. Chapter 3: Training Models with Tabular Data
  7. Chapter 4: Training Models with Text Data
  8. Chapter 5: Training Recommender Systems
  9. Chapter 6: Training Models with Visual Data
  10. Chapter 7: Deployment and Model Maintenance
  11. Chapter 8: Extended fastai and Deployment Features
  12. Other Books You May Enjoy
Estilos de citas para Deep Learning with fastai Cookbook

APA 6 Citation

Ryan, M. (2021). Deep Learning with fastai Cookbook (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/2969544/deep-learning-with-fastai-cookbook-pdf (Original work published 2021)

Chicago Citation

Ryan, Mark. (2021) 2021. Deep Learning with Fastai Cookbook. 1st ed. Packt Publishing. https://www.perlego.com/book/2969544/deep-learning-with-fastai-cookbook-pdf.

Harvard Citation

Ryan, M. (2021) Deep Learning with fastai Cookbook. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/2969544/deep-learning-with-fastai-cookbook-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Ryan, Mark. Deep Learning with Fastai Cookbook. 1st ed. Packt Publishing, 2021. Web. 15 Oct. 2022.