Preface
TensorFlow is Google's popular offering for machine learning and deep learning. It has quickly become a popular choice of tool for performing fast, efficient, and accurate deep learning tasks.
This book shows you practical implementations of real-world projects, teaching you how to leverage TensorFlow's capabilities to perform efficient deep learning. In this book, you will be acquainted with the different paradigms of performing deep learning, such as deep neural nets, convolutional neural networks, recurrent neural networks, and more, and how they can be implemented using TensorFlow.
This will be demonstrated with the help of end-to-end implementations of three real-world projects on popular topic areas such as natural language processing, image classification, and fraud detection.
By the end of this book, you will have mastered all the concepts of deep learning and their implementations with TensorFlow and Keras.
Who this book is for
This book is for application developers, data scientists, and machine learning practitioners looking to integrate machine learning into application software and master deep learning by implementing practical projects in TensorFlow. Knowledge of Python programming and the basics of deep learning is required to get the most out of this book.
What this book covers
Chapter 1, Machine Learning Toolkit, looks into installing Docker, setting up a machine learning Docker file, sharing data back with your host computer, and running a REST service to provide the environment.
Chapter 2, Image Data, teaches MNIST digits, how to acquire them, how tensors are really just multidimensional arrays, and how we can encode image data and categorical or classification data as a tensor. Then, we have a quick review and a cookbook approach to consider dimensions and tensors, in order to get data prepared for machine learning.
Chapter 3, Classical Neural Network, covers an awful lot of material! We see the structure of the classical, or dense, neural network. We learn about activation, nonlinearity, and softmax. We then set up testing and training data and learn how to construct the network with Dropout
and Flatten
. We also learn all about solvers, or how machine actually learns. We then explore hyperparameters, and finally, we fine-tune our model by means of grid search.
Chapter 4, A Convolutional Neural Network, teaches you convolutions, which are a loosely connected way of moving over an image to extract features. Then we learn about pooling, which summarizes the most important features. We will build a convolutional neural network using these techniques and we combine many layers of convolution and pooling in order to generate a deep neural network.
Chapter 5, An Image Classification Server, uses a Swagger API definition to create a REST API model, which then declaratively generates the Python framework in order for us to serve that API. Then, we create a Docker container that captures not only our running code (that is, our service) but also our pre-trained machine learning model. This then forms a package so that we are able to deploy and use our container. Finally, we use this container to serve and make predictions.
To get the most out of this book
You'll need:
- Experience with command-line shell
- Experience with Python scripting or application development
Download the example code files
You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packtpub.com.
- Select the
SUPPORT
tab. - Click on
Code Downloads & Errata
. - Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Deep-Learning-for-Images-with-TensorFlow. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "You just have to type docker --help
to make sure that everything is installed."
Any command-line input or output is written as follows:
C:\11519>docker build -t keras .
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "We're going to select and copy the test command we'll be using later, and click on Apply
."
Note
Warnings or important notes appear like this.
Note
Tips and tricks appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: Email [email protected]
and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected]
.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected]
with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packtpub.com.