April 2026
461 pages
17h 56m
English
We’ve done all the hard work so far for the analysis or, as we say, the predict method, as shown in Listing 5.5. Only one vector gets passed to the predict method as a parameter, which is to be analyzed and represents the input to the network. “Analyzed” here means that the calculations are carried out from layer to layer. Of course, it would be great if the dimension of the input vector matched the dimension of the input layer. Otherwise, it crashes because we haven’t built in any special tests.
def predict(self,x): """ The output y_hat is calculated for the input x A prediction is calculated for vector x and the matrix values of the layers (not the weights) are adjusted """ # Input layer # Set the input
Read now
Unlock full access