Softmax

Softmax

Softmax=ex∑yey=exex+ey

Derivation of Softmax

Derivative w.r.t. x

f(x)=exex+eydf(x)dx=(ex+ey)ddxex−exddx(ex+ey)(ex+ey)2=(ex+ey)ex−exex(ex+ey)2=ex(ex+ey)((ex+ey)(ex+ey)−ex(ex+ey))=f(x)(1−f(x))

Derivative w.r.t y

f(x)=exex+eydf(x)dy=(ex+ey)ddyex−exddy(ex+ey)(ex+ey)2=(ex+ey)0−exey(ex+ey)2=−exex+ey.eyex+ey=−f(x).f(y)

Related Notes