A Loss Hidden Behind a Shift

Statistics for Deep LearningMedium+20 XP+20

A Loss Hidden Behind a Shift

A three-class network outputs the logit vector

z=[ 7.0794,  5.0000,  5.0000 ]\mathbf{z} = [\,7.0794,\; 5.0000,\; 5.0000\,]z=[7.0794,5.0000,5.0000]

for one training example. These logits are passed through softmax,

pi=ezi∑j=13ezjp_i = \frac{e^{z_i}}{\sum_{j=1}^{3} e^{z_j}}pi​=∑j=13​ezj​ezi​​

and the result is scored with the cross-entropy (negative log likelihood) loss L=−ln⁡(ptrue)L = -\ln(p_{\text{true}})L=−ln(ptrue​).

The ground-truth label for this example is class 3.

What is the loss, in nats?

You may use ln⁡2≈0.6931\ln 2 \approx 0.6931ln2≈0.6931 and ln⁡5≈1.6094\ln 5 \approx 1.6094ln5≈1.6094. No calculator is needed.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.