Book Image

Deep Learning from the Basics

By : Koki Saitoh
5 (1)
Book Image

Deep Learning from the Basics

5 (1)
By: Koki Saitoh

Overview of this book

Deep learning is rapidly becoming the most preferred way of solving data problems. This is thanks, in part, to its huge variety of mathematical algorithms and their ability to find patterns that are otherwise invisible to us. Deep Learning from the Basics begins with a fast-paced introduction to deep learning with Python, its definition, characteristics, and applications. You’ll learn how to use the Python interpreter and the script files in your applications, and utilize NumPy and Matplotlib in your deep learning models. As you progress through the book, you’ll discover backpropagation—an efficient way to calculate the gradients of weight parameters—and study multilayer perceptrons and their limitations, before, finally, implementing a three-layer neural network and calculating multidimensional arrays. By the end of the book, you’ll have the knowledge to apply the relevant technologies in deep learning.
Table of Contents (11 chapters)

Limitations of Perceptrons

As described so far, we can use a perceptron to implement AND, NAND, and OR logic gates. In this next section, you will consider an XOR gate.

XOR Gate

An XOR gate is a gate circuit that is also called an exclusive OR. As shown in Figure 2.5, the output is 1 when either x1 or x2 is 1 ("exclusive" means "limited to only one person"). What should be the value of the weights to realize the XOR gate by using a perceptron?

Figure 2.5: Truth table of an XOR gate

In fact, we cannot build this XOR gate by using the perceptron that we have learned about so far. Why can we not build XOR even though we can build AND and OR gates?

First, let's examine the behavior of an OR gate visually. An OR gate satisfies the truth table in Figure 2.5 when the weight parameters are (b, w1, w2) = (-0.5, 1.0, 1.0), for example. In this case, the perceptron is represented by equation (2.3):

...