How it works...

This section explains how the weights and bias are initialized for use in later parts of this chapter:

  1. The weights are generated randomly using numpyand a random seed is set to ensure the same random numbers are generated each time
  2. The weights will be assigned a generic variable of w1 and w2
  3. The bias is also generated randomly using numpy and a random seed is set to maintain the same random numbers is generated each time
  4. The bias will be assigned a generic variable of b
  5. The values are inserted into a summation function, z, which populates an initial score that will feed into another function, the activation function, to be discussed later on in this chapter
  6. At the moment, all three variables are completely random.  The output of w1, w2, and b can be seen in the following screenshot: