Python Code for a Basic Neural Network
Explore how to create and test a basic neural network in Python by writing a neural network class, importing necessary modules, and querying the network with example inputs to verify functionality.
We'll cover the following...
We'll cover the following...
Neural network class
Let’s pause to check what the code for the neural network class we’re building up looks like. It should look something like this:
That is just the class. Aside from that, we should be importing the numpy and scipy.special modules right at the top of the code in the cell.
Note that the query() function only needs the input_list. It doesn’t need any other input.
That’s good progress, and now we’ll look at the missing piece, the train() function. ...