Deep Learning with fastai Cookbook
eBook - ePub

Deep Learning with fastai Cookbook

Mark Ryan

  1. 338 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Deep Learning with fastai Cookbook

Mark Ryan

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Deep Learning with fastai Cookbook als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Deep Learning with fastai Cookbook von Mark Ryan im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatica & Intelligenza artificiale (IA) e semantica. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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...

Inhaltsverzeichnis

  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
Zitierstile für 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.