April 2019
Intermediate to advanced
212 pages
5h 34m
English
We calculate the values for the hidden layer nodes by taking the dot product of the input layer, x, and the first set of weights, w1. We apply the ReLU function to the hidden layer, h, and store the result in h_relu, as follows:
...h = x.dot(weights_1)h_relu = np.maximum(h, 0)
Finally, we calculate our predicted y values by taking the dot product of the hidden layer and the second set of weights, w2:
y_pred = h_relu.dot(weights_2)...
We now have a vector of predictions. Let's find out how good our predictions were by computing the loss function.
Read now
Unlock full access