You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@horn.apache.org by "Edward J. Yoon" <ed...@samsung.com> on 2016/05/17 06:04:44 UTC
discuss, softmax + cross entropy loss
Hi,
While I try to implement softmax function for output layer (reading
http://www.cs.nyu.edu/~eugenew/asr13/lecture_14.pdf), I see some bad of
current neuron-centric programming model.
Basically, the cross entropy loss calculation is fine. The problem is
calculations of page 9 and Eqn 23 of page 14.
For example, y = [2.0, 1.0, 0.1], s(y) = [0.7, 0.2, 0.1], and label = [1.0,
0.0, 0.0]. Then, ith element of delta vector is xj(y^i - yi) = output[i] *
(lable[i] - softmaxed_output[i]). In short, we need to calculate the sum of
each neurons output of whole layer and, both intermediate and softmaxed
output values to calculate the delta vector.
As you already know, we currently provides two functions: forward() and
backward(). To aggregate the intermediate outputs of whole layer, we have to
add some additional API I think. Or, we have to add layer-level function.
Also, both intermediate and activated outputs should be accessible
internally.
Do you have any good idea?
--
Best Regards, Edward J. Yoon