You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is to simulate PyTorch soft entropy layer which includes a softmax layer at the first layer. Labels are passed in as integer indices.
method__init__
__init__(*shape, axis=1)
methodbackward
backward()
For the log-softmax function $z(x)$, when $i = k$, we have $\partial z_i / \partial x_k = 1 - y_k$. And when $i \not= k$, we have $\partial z_i / \partial x_k = - y_k$.