Deep Learning with fastai Cookbook - Mark Ryan - E-Book

Deep Learning with fastai Cookbook E-Book

Mark Ryan

0,0
34,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

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

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 338

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Deep Learning with fastai Cookbook

Leverage the easy-to-use fastai framework to unlock the power of deep learning

Mark Ryan

BIRMINGHAM—MUMBAI

Deep Learning with fastai Cookbook

Copyright © 2021 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Kunal Parikh

Publishing Product Manager: Ali Abidi

Senior Editor: Roshan Kumar

Content Development Editor: Tazeen Shaikh

Technical Editor: Sonam Pandey

Copy Editor: Safis Editing

Project Coordinator: Aparna Ravikumar Nair

Proofreader: Safis Editing

Indexer: Manju Arasan

Production Designer: Vijay Kamble

First published: August 2021

Production reference: 1210721

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80020-810-0

www.packt.com

To the memory of my father, Ben. He would have loved fastai.– Mark Ryan

Contributors

About the author

Mark Ryan is a machine learning practitioner and technology manager who is passionate about delivering end-to-end deep learning applications that solve real-world problems. Mark has worked on deep learning projects that incorporate a variety of related technologies, including Rasa chatbots, web applications, and messenger platforms. As a strong believer in democratizing technology, Mark advocates for Keras and fastai as accessible frameworks that open up deep learning to non-specialists. Mark has a degree in computer science from the University of Waterloo and a Master of Science degree in computer science from the University of Toronto.

I want to thank my family for their support during the development of this book. In particular, I would like to acknowledge my nephew, Rowan Hansen, for his advice on web development. My friends, in particular Dr. Laurence Mussio, Peter Moroney, Luc Chamberland, and Alan Hall, provided much-appreciated support to me while I wrote this book. Finally, I would like to thank the team at Packt for guiding me through the process of completing this book.

About the reviewer

Rupsi Kaushik is a backend engineer at the Paris-based AI start-up reciTAL. She graduated from the University of Ottawa with a B.Sc. in computer science with an option in entrepreneurship and management. Her interest in machine learning was first sparked when she created her first search engine from scratch, and it has grown ever since. She hopes to learn more about AI for social good and make a meaningful impact on the world.

Table of Contents

Preface

Chapter 1: Getting Started with fastai

Technical requirements

Setting up a fastai environment in Paperspace Gradient

Getting ready

How to do it…

How it works…

There's more…

Setting up a fastai environment in Google Colab

Getting ready

How to do it…

How it works…

There's more…

Setting up JupyterLab environment in Gradient

Getting ready

How to do it…

How it works…

There's more…

"Hello world" for fastai – creating a model for MNIST

Getting ready…

How to do it…

How it works…

There's more…

Understanding the world in four applications: tables, text, recommender systems, and images

Getting ready

How to do it…

How it works…

Working with PyTorch tensors

Getting ready

How to do it…

How it works…

There's more…

Contrasting fastai with Keras

Getting ready

How to do it…

How it works…

Test your knowledge

Chapter 2: Exploring and Cleaning Up Data with fastai

Technical requirements

Getting the complete set of oven-ready fastai datasets

Getting ready

How to do it…

How it works…

There's more…

Examining tabular datasets with fastai

Getting ready

How to do it…

How it works…

There's more…

Examining text datasets with fastai

Getting ready

How to do it…

How it works…

Examining image datasets with fastai

Getting ready

How to do it…

How it works…

There's more…

Cleaning up raw datasets with fastai

Getting ready

How to do it…

How it works…

Chapter 3: Training Models with Tabular Data

Technical requirements

Training a model in fastai with a curated tabular dataset

Getting ready

How to do it…

How it works…

Training a model in fastai with a non-curated tabular dataset

Getting ready

How to do it…

How it works…

Training a model with a standalone dataset

Getting ready

How to do it…

How it works…

Assessing whether a tabular dataset is a good candidate for fastai

Getting ready

How to do it…

How it works…

Saving a trained tabular model

Getting ready

How to do it…

How it works…

Test your knowledge

Getting ready

Chapter 4: Training Models with Text Data

Technical requirements

Training a deep learning language model with a curated IMDb text dataset

Getting ready

How to do it…

How it works…

There's more…

Training a deep learning classification model with a curated text dataset

Getting ready

How to do it…

How it works…

There's more…

Training a deep learning language model with a standalone text dataset

Getting ready

How to do it…

How it works…

Training a deep learning text classifier with a standalone text dataset

Getting ready

How to do it…

How it works…

Test your knowledge

Getting ready

How to do it…

Chapter 5: Training Recommender Systems

Technical requirements

Training a recommender system on a small curated dataset

Getting ready

How to do it…

How it works…

Training a recommender system on a large curated dataset

Getting ready

How to do it…

How it works…

Training a recommender system on a standalone dataset

Getting ready

How to do it…

How it works…

Test your knowledge

Getting ready

How to do it…

Chapter 6: Training Models with Visual Data

Technical requirements

Training a classification model with a simple curated vision dataset

Getting ready

How to do it…

How it works…

Exploring a curated image location dataset

Getting ready

How to do it…

How it works…

Training a classification model with a standalone vision dataset

Getting ready

How to do it…

How it works…

Training a multi-image classification model with a curated vision dataset

Getting ready

How to do it…

How it works…

Test your knowledge

Getting ready

How to do it…

Chapter 7: Deployment and Model Maintenance

Technical requirements

Setting up fastai on your local system

Getting ready

How to do it…

How it works…

Deploying a fastai model trained on a tabular dataset

Getting ready

How to do it…

How it works…

There's more…

Deploying a fastai model trained on an image dataset

Getting ready

How to do it…

How it works…

There's more…

Maintaining your fastai model

Getting ready

How to do it…

How it works…

There's more…

Test your knowledge

Getting ready

How to do it…

Chapter 8: Extended fastai and Deployment Features

Technical requirements

Getting more details about models trained with tabular data

Getting ready

How to do it…

How it works…

Getting more details about image classification models

Getting ready

How to do it…

How it works…

Training a model with augmented data

Getting ready

How to do it…

How it works…

Using callbacks to get the most out of your training cycle

Getting ready

How to do it…

How it works…

Making your model deployments available to others

Getting ready

How to do it…

How it works…

Displaying thumbnails in your image classification model deployment

Getting ready

How to do it…

How it works…

Test your knowledge

Explore the value of repeatable results

Displaying multiple thumbnails in your image classification model deployment

Conclusion and additional resources on fastai

Other Books You May Enjoy