November 2016
Beginner to intermediate
941 pages
21h 55m
English
Now that we know how to create a perceptron, let's create a single layer neural network. A single layer neural network consists of multiple neurons in a single layer. Overall, we will have an input layer, a hidden layer, and an output layer.
import numpy as np import matplotlib.pyplot as plt import neurolab as nl
data_single_layer.txt file. Let's load this:# Define input data input_file = 'data_single_layer.txt' input_text = np.loadtxt(input_file) data = input_text[:, 0:2] labels = input_text[:, 2:]
# Plot input data plt.figure() plt.scatter(data[:,0], data[:,1]) plt.xlabel('X-axis') ...