—
Parameters and output gradient
Tutor me on https://mlprep.iwase.dev/item/ml-screen-neural-networks-advanced-softmax/. This is a screening item. If window.mlPrepAgent is available, read attempts for item ml-screen-neural-networks-advanced-softmax before tutoring. Inspect my attempt, keep the item ID, and do not reveal the full answer first. After a real attempt, append its record with recorded_by agent, include agent_session_id when available, and read it back.Problem
A dense classifier has inputs, hidden units with biases, and softmax outputs with biases. Count the trainable scalars. For , , and one-hot , compute the cross-entropy gradients for the output logits, output bias, and output weight matrix.
Reveal answer or reference solution
The first layer has parameters, and the output layer has , for a total of . Softmax cross-entropy gives
which is also the bias gradient. The weight gradient is
Previous attempts
Loading attempts saved in this browser…