Deep Learning · Module 8
Answers and explanations · Debug the learning process before enlarging the model
Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.
Deep Learning · Module 8
Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.
8A. The difference matrix has rows [0,-1,-2], [1,0,-1], [2,1,0]. Squared values sum to 12; mean over nine entries is 4/3. Correct corresponding-row differences are all zero. Shape success can conceal an unintended all-pairs comparison.
8B. Missing optimizer membership: inspect parameter IDs versus optimizer groups. Disconnected graph: inspect requires_grad and whether loss depends on the parameter; a detached output breaks that path. Clearing after backward: inspect gradients immediately before step. A zero gradient for one inactive unit/batch may be legitimate, so compare several meaningful cases.
8C. Accuracy=(60+30)/120=.75; precision=30/(30+10)=.75; recall=30/(30+20)=.6. A higher false-negative cost may justify another threshold, selected using validation and a stated cost tradeoff. It does not authorize test-set threshold tuning.