Monday, July 28, 2025

438 Computational graph of a 3-layer perceptron

438 Computational graph of a 3-layer perceptron

The computational graph of the three-layer perceptron visually organizes how data is transformed from input to output to produce the final predicted result. The model consists of three layers: an input layer, a hidden layer, and an output layer, each of which plays a specific role. First, the input layer takes in externally given data and sends it to the next hidden layer. In the hidden layer, the input is weighted and an adjustment value, called a bias, is added, and then the signal is transformed through a nonlinear activation function. This makes it possible to extract complex features and relationships that cannot be captured by simple linear calculations.

The activated output is further passed to the output layer, where it is transformed again with weights and biases, and then passed through a final activation function (e.g., a softmax function for a classification problem) to obtain predictions. These predictions are then compared to the actual correct labels to compute a measure of error called the loss function. The loss function is an important guideline in learning because it quantifies how much the model deviates from the correct answer.

In classification problems, a particularly common loss function is the cross-entropy error. It is characterized by the fact that the higher the probability of the output corresponding to the correct label, the smaller the loss, and conversely, the higher the probability for the wrong label, the larger the loss. This property makes cross-entropy error sensitive to discrepancies between probabilistic predictions and labels, making it suitable for orienting learning.

Thus, the computational graph serves to link a series of computational processes from input to output and the calculation of loss. In addition, a technique called error back propagation follows this graph in the reverse direction, calculating how much each parameter (weight or bias) affected the loss and improving the model accordingly. It is this structure and mechanism that makes the three-layer perceptron a widely used fundamental model in machine learning.

No comments:

Post a Comment