Working details of a simple neural network

In order to understand how neural networks work, we will build a very simple network. The input and the expected output are as follows:

import numpy as npx=np.array([[1,2],[3,4]])y=np.array([0,1])

Note that x is the input dataset with two variables for each of the two rows. y is the expected output for the two inputs.

Essentially, we have the input and output layers in place.

As an example, for one of the preceding data points, the input and the output values of the network will look like this:

In traditional machine learning, you would find the relation directly between the input and output values. ...

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.