This article was written by Adrian Rosebrock. Adrian is an entrepreneur and Ph.D who has launched two successful image search engines, ID My Pill and Chic Engine. If you've been following along with this series of blog posts, then you already know what a hugefan I am of Keras. Keras is a super powerful, easy to use Python library for building neural networks and deep learning networks. In the remainder of this blog post, I'll demonstrate how to build a simple neural network using Python and Keras, and then apply it to the task of image classification.
In today's blog post, I demonstrated how to train a simple neural network using Python and Keras. We then applied our neural network to the Kaggle Dogs vs. Cats dataset and obtained 67.376% accuracy utilizing only the raw pixel intensities of the images. Starting next week, I'll begin discussing optimization methods such as gradient descent and Stochastic Gradient Descent (SGD). I'll also include a tutorial on backpropagation to help you understand the inner-workings of this important algorithm.
If you've been following along with this series of blog posts, then you already know what a huge fan I am of Keras. Keras is a super powerful, easy to use Python library for building neural networks and deep learning networks. In the remainder of this blog post, I'll demonstrate how to build a simple neural network using Python and Keras, and then apply it to the task of image classification. To start this post, we'll quickly review the most common neural network architecture -- feedforward networks. We'll then write some Python code to define our feedforward neural network and specifically apply it to the Kaggle Dogs vs. Cats classification challenge.
Motivated by the flexibility of biological neural networks whose connectivity structure changes significantly during their lifetime, we introduce the Unstructured Recursive Network (URN) and demonstrate that it can exhibit similar flexibility during training via gradient descent. We show empirically that many of the different neural network structures commonly used in practice today (including fully connected, locally connected and residual networks of different depths and widths) can emerge dynamically from the same URN. These different structures can be derived using gradient descent on a single general loss function where the structure of the data and the relative strengths of various regulator terms determine the structure of the emergent network. We show that this loss function and the regulators arise naturally when considering the symmetries of the network as well as the geometric properties of the input data.
The first class of network adaptation algorithms start out with a redundant architecture and proceed by pruning away seemingly unimportant weights (Sietsma and Dow, 1988; Le Cun et aI, 1990). A second class of algorithms starts off with a sparse architecture and grows the network to the complexity required by the problem. Several algorithms have been proposed for growing feedforward networks. The upstart algorithm of Frean (1990) and the cascade-correlation algorithm of Fahlman (1990) are examples of this approach.