- Apache Spark Deep Learning Cookbook
- Ahmed Sherif Amrith Ravindra
- 154字
- 2025-02-26 11:49:44
How it works...
This section explains how the weights and bias are initialized for use in later parts of this chapter:
- The weights are generated randomly using numpy, and a random seed is set to ensure the same random numbers are generated each time
- The weights will be assigned a generic variable of w1 and w2
- The bias is also generated randomly using numpy and a random seed is set to maintain the same random numbers is generated each time
- The bias will be assigned a generic variable of b
- 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
- At the moment, all three variables are completely random. The output of w1, w2, and b can be seen in the following screenshot:
