Softmax is widely used in machine learning. However, people who are new to machine learning may not understand the features and benefits of softmax. After learning about it, you will find that softmax is easy to compute, the effect is remarkable and is very easy to use.
Let's take a look at what softmax actually means.
We know Max. If I have two numbers, A and B, and A> B, if Max is used, a is taken directly. There is no second possibility.
But sometimes I don't want to do this, because it will cause hunger with a small score. So I hope that the item with a higher score can be obtained frequently, and the item with a lower score can also be obtained occasionally. So I can use softmax and now I can still use a and B, A> B, if we calculate the probability of a and B Based on softmax, The softmax value of A is greater than that of B, so a will often get it, and B will get it occasionally, probability is related to their original size. So what is the probability of soft Max, instead of Max? Let's take a look at it.
Definition
Suppose we have an array where V and VI represent the I-th element in V, then the softmax value of this element is
That is to say, it is the index of the element, and the ratio to all element indexes.
Softmax function model Introduction