Deep Learning with fastai Cookbook
eBook - ePub

Deep Learning with fastai Cookbook

Mark Ryan

  1. 338 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Deep Learning with fastai Cookbook

Mark Ryan

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

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

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Deep Learning with fastai Cookbook è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Deep Learning with fastai Cookbook di Mark Ryan in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatica e Intelligenza artificiale (IA) e semantica. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

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

Indice dei contenuti

  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
Stili delle citazioni per 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.