February 2019
Beginner to intermediate
308 pages
7h 42m
English
Now that we understand the basic architecture of a neural network, let's create our own neural network from scratch in Python.
First, let's create a NeuralNetwork class in Python:
import numpy as npclass NeuralNetwork: def __init__(self, x, y): self.input = x self.weights1 = np.random.rand(self.input.shape[1],4) self.weights2 = np.random.rand(4,1) self.y = y self.output = np.zeros(self.y.shape)