Deep Learning · MT2 · section
F22 Q1b
F22 selected MT2 practice
Question
Question (4 marks). Weights are 0.55 and 0.65; their gradients are+0.3 and−0.25. With η = 0.1, compute gradient-descent changes and new weights.
Answer — step by step
Given
Old weights = [0.55,0.65].
Corresponding supplied gradients = [0.3,−0.25]; η = 0.1.
To find
Calculate the signed weight changes and both new weights.
Formula — which one and why
Gradient descent. Evaluate the gradient at the current parameter, multiply by the learning rate and subtract. If the objective is supplied, differentiate it and recompute the gradient after each update.
θ (theta) = trainable parameter; g = derivative of the stated objective J; η = learning rate; t labels the update number.
g_t=J\prime(\theta_{t-1})\theta_t=\theta_{t-1}-\eta g_tYaad rakhne ka cue: Naya = purana − learning rate × current gradient.
Solution — step by step
Step 1: calculate the change in weight 1.
\Delta w_1=-0.1(0.3)=-0.03Step 2: add that change to old weight 1.
w_1^{\mathrm{new}}=0.55+(-0.03)=0.52Step 3: calculate the change in weight 2.
\Delta w_2=-0.1(-0.25)=0.025Step 4: add that change to old weight 2.
w_2^{\mathrm{new}}=0.65+0.025=0.675Final answer: changes = [−0.03, +0.025]; new weights = [0.52, 0.675]. A negative gradient increases its weight under descent.