Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Deep Learning with TensorFlow

You're reading from  Deep Learning with TensorFlow

Product type Book
Published in Apr 2017
Publisher Packt
ISBN-13 9781786469786
Pages 320 pages
Edition 1st Edition
Languages
Authors (3):
Giancarlo Zaccone Giancarlo Zaccone
Profile icon Giancarlo Zaccone
Md. Rezaul Karim Md. Rezaul Karim
Profile icon Md. Rezaul Karim
Ahmed Menshawy Ahmed Menshawy
Profile icon Ahmed Menshawy
View More author details

Table of Contents (11) Chapters

Preface Getting Started with Deep Learning First Look at TensorFlow Using TensorFlow on a Feed-Forward Neural Network TensorFlow on a Convolutional Neural Network Optimizing TensorFlow Autoencoders Recurrent Neural Networks GPU Computing Advanced TensorFlow Programming Advanced Multimedia Programming with TensorFlow Reinforcement Learning

Preface

Machine learning is concerned with algorithms that transform raw data into information into actionable intelligence. This fact makes machine learning well suited to the predictive analytics of big data. Without machine learning, therefore, it would be nearly impossible to keep up with these massive streams of information altogether. On the other hand, the deep learning is a branch of machine learning algorithms based on learning multiple levels of representation. Just in the last few years have been developed powerful deep learning algorithms to recognize images, natural language processing and perform a myriad of other complex tasks. A deep learning algorithm is nothing more than the implementation of a complex neural network so that it can learn through the analysis of large amounts of data. This book introduces the core concepts of deep learning using the latest version of TensorFlow. This is Google’s open-source framework for mathematical, machine learning and deep learning capabilities released in 2011. After that, TensorFlow has achieved wide adoption from academia and research to industry and following that recently the most stable version 1.0 has been released with a unified API. TensorFlow provides the flexibility needed to implement and research cutting-edge architectures while allowing users to focus on the structure of their models as opposed to mathematical details. Readers will learn deep learning programming techniques with the hands-on model building, data collection and transformation and even more!

Enjoy reading!

What this book covers

Chapter 1, Getting Started with TensorFlow, covers some basic concepts that will be found in all the subsequent chapters. We’ll introduce machine learning and deep learning architectures. Finally, we’ll introduce deep learning architectures, the so-called Deep Neural Networks: these are distinguished from the more commonplace single-hidden-layer neural networks by their depth; that is, the number of node layers through which data passes in a multistep process of pattern recognition. We will provide a comparative analysis of deep learning architectures with a chart summarizing all the neural networks from where most of the deep learning algorithm evolved.

Chapter 2, First Look at TensorFlow, will cover the main features and capabilities of TensorFlow 1.x: getting started with computation graph, data model, programming model and TensorBoard. In the last part of the chapter, we’ll see TensorFlow in action by implementing a Single Input Neuron. Finally, it will show how to upgrade from TensorFlow 0.x to TensorFlow 1.x.

Chapter 3, Using TensorFlow on a Feed-Forward Neural Network, provides a detailed introduction of feed-forward neural networks. The chapter will be also very practical, implementing a lot of application examples using this fundamental architecture.

Chapter 4, TensorFlow on a Convolutional Neural Network, introduces the CNNs networks that are the basic blocks of a deep learning-based image classifier. We’ll develop two examples of CNN networks; the first is the classic MNIST digit classification problem, while the purpose for the second is to train a network on a series of facial images to classify their emotional stretch.

Chapter 5, Optimizing TensorFlow Autoencoders, presents autoencoders networks that are designed and trained for transforming an input pattern so that, in the presence of a degraded or incomplete version of an input pattern, it is possible to obtain the original pattern. In the chapter, we’ll see autoencoders in action with some application examples.

Chapter 6, Recurrent Neural Networks, explains this fundamental architecture designed to handle data that comes in different lengths, that is very popular for various natural language processing tasks. Text processing and image classification problems will be implemented in the course if this chapter.

Chapter 7, GPU Computing, shows the TensorFlow facilities for GPU computing. In this chapter, we’ll explore some techniques to handle GPU using TensorFlow.

Chapter 8, Advanced TensorFlow Programming, gives an overviewof the following TensorFlow-based libraries: Keras, Pretty Tensor, and TFLearn. For each library, we’ll describe the main features with an application example.

Chapter 9, Advanced Multimedia Programming with TensorFlow, covers some advanced and emerging aspects of multimedia programming using TensorFlow. Deep neural networks for scalable object detection and deep learning on Android using TensorFlow with an example with the code will be discussed. The Accelerated Linear Algebra (XLA) and Keras will be discussed with examples to make the discussion more concrete.

Chapter 10, Reinforcement Learning, covers the basic concepts of RL. We will experience the Q-learning algorithm that is one of the most popular reinforcement learning algorithms. Furthermore, we’ll introduce the OpenAI gym framework that is a TensorFlow compatible, toolkit for developing and comparing reinforcement learning algorithms.

What you need for this book

All the examples have been implemented using Python version 2.7 (and 3.5) on an Ubuntu Linux 64 bit including the TensorFlow library version 1.0.1. However, all the source codes that are shown in the book are Python 2.7 compatible. Further, source codes for Python 3.5 compatible can be downloaded from the Packt repository. Source codes for Python 3.5+ compatible can be downloaded from the Packt repository.

You will also need the following Python modules (preferably the latest version):

  • Pip
  • Bazel
  • Matplotlib
  • NumPy
  • Pandas
  • mnist_data

For chapters 8, 9 and 10, you will need the following frameworks too:

  • Keras
  • XLA
  • Pretty Tensor
  • TFLearn
  • OpenAI gym

Most importantly, GPU-enabled version of TensorFlow has several requirements such as 64-bit Linux, Python 2.7 (or 3.3+ for Python 3), NVIDIA CUDA® 7.5 (CUDA 8.0 required for Pascal GPUs) and NVIDIA cuDNN v4.0 (minimum) or v5.1 (recommended). More specifically, the current implementation of TensorFlow supports GPU computing with NVIDIA toolkits, drivers and software only.

Who this book is for

This book is dedicated to developers, data analysts, or deep learning enthusiasts who do not have much background with complex numerical computations but want to know what deep learning is. The book majorly appeals to beginners who are looking for a quick guide to gain some hands-on experience with deep learning. A rudimentary level of programming in one language is assumed as is a basic familiarity with computer science techniques and technologies including basic awareness of computer hardware and algorithms. Some competence in mathematics is needed to the level of elementary linear algebra and calculus.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "To save a model, we use the Saver() class."

A block of code is set as follows:

saver = tf.train.Saver()
save_path = saver.save(sess, "softmax_mnist")
print("Model saved to %s" % save_path)

Any command-line input or output is written as follows:

 $ sudo apt-get install python-pip python-dev

Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on the GRAPH tab you'll be able to see the computation graph with the auxiliary nodes."

Warnings or important notes appear in a box like this.
Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

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/Deep-Learning-with-TensorFlow. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.

lock icon The rest of the chapter is locked
Next Chapter arrow right
You have been reading a chapter from
Deep Learning with TensorFlow
Published in: Apr 2017 Publisher: Packt ISBN-13: 9781786469786
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}