Book Image

Hands-On Deep Learning for Images with TensorFlow

By : Will Ballard
Book Image

Hands-On Deep Learning for Images with TensorFlow

By: Will Ballard

Overview of this book

TensorFlow is Google’s popular offering for machine learning and deep learning, quickly becoming a favorite tool for performing fast, efficient, and accurate deep learning tasks. Hands-On Deep Learning for Images with TensorFlow shows you the practical implementations of real-world projects, teaching you how to leverage TensorFlow’s capabilities to perform efficient image processing using the power of deep learning. With the help of this book, you will get to grips with the different paradigms of performing deep learning such as deep neural nets and convolutional neural networks, followed by understanding how they can be implemented using TensorFlow. By the end of this book, you will have mastered all the concepts of deep learning and their implementation with TensorFlow and Keras.
Table of Contents (7 chapters)

Pooling

Now, in this section, we'll move on to pooling. We'll be learning about the one-dimensional pooling operation; the two-dimensional pooling operation, such as you would use on an image; and then finally, we are going to discuss image channels and how they're used in this data.

Okay, from the top, we're going to be importing keras and some additional layers this timeparticularly MaxPooling1D, and MaxPooling2Dand we're going to go ahead and import the convolutional 2D layer, which we'll be using a little bit later on. So, if you take a peek at the code, what we're doing is setting up a matrix, and this matrix just has some values. You can think of it as a square matrix of almost all ones, but I've sprinkled some higher values in here; there's 2, 3, 4, and 5. What the max pooling is going to do is extract out the...