Question: Q 9 . Using a computation graph ( of the kind we discussed in class ) , compute the gradi - ent of the cross

Q9. Using a computation graph (of the kind we discussed in class), compute the gradi- ent of the cross entropy loss with respect to the model parameters in the above network. Repeatedly split the loss function by operators like we did in class, and ignore all bias terms. Do not split vector/matrix operators into elementwise/row-wise operations. For this question alone, you may scan a hand-drawn figure. Any writing must be perfectly legible. Finally, use NumPy (not PyTorch, although you can use PyTorch to verify your solution) to compute the value of the gradient of the loss function with respect to all pa- rameters (w1, w2, w3, v1, v2) for the given input and true label. Note that the log operator refers to the natural logarithm (base e). Report your final values and a screenshot of your code. HINT: Use element-wise multiplication between vectors of the same length. [Link: Derivative of Softmax]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!