ABSTRACT

Circling back to neural-network terminology, what we've done here is prototype the action of a network that has a singlelayer: the output layer. Just like we saw before, the hidden layer will multiply the input it receives by the weights and add the bias. That is, it applies the function f displayed above. Then, another function is applied. Imagine, for a moment, that we had a network with three layers, and all each layer did was multiply its input by its weight matrix. Training the network means passing the input through its layers, calculating the loss, and adjusting the parameters in a way that predictions improve. The loss decreases quickly at first, and then, so rapidly anymore. But this example was not created to exhibit magnificent performance; the idea was to show how few lines of code are needed to build a “real” neural network.