Introduction

Convolution neural networks (CNN) are a category of deep learning neural networks with a prominent role in building image recognition- and natural language processing-based classification models.

The CNN follows a similar architecture to LeNet, which was primarily designed to recognize characters such as numbers, zip codes, and so on. As against artificial neural networks, CNN have layers of neurons arranged in three-dimensional space (width, depth, and height). Each layer transforms a two-dimensional image into a three-dimensional input volume, which is then transformed into a three-dimensional output volume using neuron activation.

Primarily, CNNs are built using three main types of activation layers: convolution layer ReLU, pooling layer, and fully connected layer. The convolution layer is used to extract features (spatial relationship between pixels) from the input vector (of images) and stores them for further processing after computing a dot product with weights (and biases).

Rectified Linear Unit (ReLU) is then applied after convolution to introduce non-linearity in the operation.

This is an element-wise operation (such as a threshold function, sigmoid, and tanh) applied to each convolved feature map. Then, the pooling layer (operations such as max, mean, and sum) is used to downsize the dimensionality of each feature map ensuring minimum information loss. This operation of spatial size reduction is used to control overfitting and increase the robustness of the network to small distortions or transformations. The output of the pooling layer is then connected to a traditional multilayer perceptron (also called the fully connected layer). This perceptron uses activation functions such as softmax or SVM to build classifier-based CNN models.

The recipes in this chapter will focus on building a convolution neural network for image classification using Tensorflow in R. While the recipes will provide you with an overview of a typical CNN, we encourage you to adapt and modify the parameters according to your needs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset