✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
In the Demo: one SGD step, set the random seed to 2026 and the learning rate to 0.1 then run the demo.
The initial weights should be:
Initial weights:
tensor([[ 0.3753, 0.1500],
[ 0.1319, -0.6104]])
Initial biases:
tensor([ 0.0136, -0.3036])
The gradients should be:
Gradient computation:
grad(W):
tensor([[ 0.2432, -0.1886],
[-0.2432, 0.1886]])
grad(b):
tensor([ 0.0957, -0.0957])
grad(W) norm: 0.4351941645145416
grad(b) norm: 0.13534791767597198
The updated weigths and biases should be:
Updated weights:
tensor([[ 0.3510, 0.1689],
[ 0.1562, -0.6293]])
Updated biases:
tensor([ 0.0041, -0.2940])
Can you explain how these updated weights and biases are calculated? Write down the formula with the for the complete computation for
initial weight -> updated weightAlso give an example computation for one of the parameters.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!