本文共 949 字,大约阅读时间需要 3 分钟。
Softmax????????????????????????0,1???????????????????V???V_i???i????Softmax?????????????
[ a_i = \frac{e^{z_i}}{\sum_{j} e^{z_j}} ]
???( z_i ) ?????????Softmax???????1????????????????????????????????????
?????????????10?????????????????????Softmax???????????????????????????
?????????????????????????????????( y_j = 1 )???????
[ \text{Loss} = -\ln a_j ]
???( a_j ) ?Softmax????j?????????
[ \frac{\partial \text{Loss}}{\partial w_{ij}} = a_i (1 - a_j) \cdot o_j ]
???( o_j ) ???????( w_{ij} ) ??????????????????????
[ \frac{\partial \text{Loss}}{\partial w_{ij}} = a_i a_j \cdot o_j ]
?????????????????????????
?????????????????[2, 3, 4]?Softmax?????????
[ \begin{align*} a_1 &= \frac{e^2}{e^2 + e^3 + e^4} \ a_2 &= \frac{e^3}{e^2 + e^3 + e^4} \ a_3 &= \frac{e^4}{e^2 + e^3 + e^4} \end{align*} ]
????????????????
[ [0.0903, 0.2447 - 1, 0.665] = [0.0903, -0.7553, 0.665] ]
?????????????????????????????
转载地址:http://xaxz.baihongyu.com/