1 1 vote Suppose we build a neural network for a 5-class classification task. Suppose for a single training example, the true label is $\left[\begin{array}{lllll}1 & 0 & 0 & 0 & 0\end{array}\right]$ while the predictions by the neural network are $[0.1 \quad 0.5\quad 0.1 \quad0 .1\quad0 .2]$. What would be the value of cross-entropy loss for this example? Machine Learning goclasses machine-learning goclasses-da-dpp goclasses-da-dpp-day-26 goclasses-ml-practice-questions numerical-answers + – GO Classes 753 views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Mavani_Naitik commented Sep 1 reply Follow flag why we don't devide it with N = number of classes? 0 0 replyShare Laplance_Demon commented Sep 21 reply Follow flag Thi is softmax in this these prob are already normazlized ie theire sum is 1 so we use categorical loss function to find it 0 0 replyShare Please log in or register to add a comment.
1 1 vote $$ \begin{aligned} & \text { Cross entropy }=-\sum y_i \log _2 \hat{y}_i \\ & =-1 * \log _2(0.1)-0 * \log _2(0.5)-0 * \log _2(0.1)-0 * \log _2(0.1)-0 * \log _2(0.2) \\ & =-\log _2(0.1)=3.322 \end{aligned} $$ GO Classes answered Oct 13, 2025 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.