July 2019
Intermediate to advanced
512 pages
19h 39m
English
To perform the XOR gate operation, we build a simple two-layer neural network, as shown in the following diagram. As you can see, we have an input layer with two nodes: a hidden layer with five nodes and an output layer comprising one node:

We will understand step-by-step how a neural network learns the XOR logic:
import numpy as npimport matplotlib.pyplot as plt%matplotlib inline
X = np.array([ [0, 1], [1, 0], [1, 1],[0, 0] ])y = p.array([ [1], [1], [0], [0]])
num_input = ...
Read now
Unlock full access