4. (Long computation) Suppose \(\mathbb{R}^K \ni \hat{y} = (\hat{y}_1, \dots, \hat{y}_K)^T = \text{Softmax}(Wz)\) for \(z \in \mathbb{R}^{n \times 1}\), \(W \in \mathbb{R}^{K \times n}\), show that for \(w_k\) being the k-th row of W:
\(\frac{\partial}{\partial w_k} \ell(y, \hat{y}) = -z^T (1_{\{y=k\}} - \hat{y}_k)\)