DLS course 2 week 2 assignment

Hello ,

I have fixed most of my errors and are getting correct values for the W’s in test but nan for b1 and close values for b2.

W1 =
[[ 1.63942428 -0.6268425 -0.54320974]
[-1.08782943 0.85036983 -2.2865723 ]]
W2 =
[[ 0.33356139 -0.26425199 1.47707772]
[-2.04538458 -0.30744933 -0.36903141]
[ 1.14873036 -1.09256871 -0.15734651]]
b1 =
[[nan]
[nan]]
b2 =
[[-0.88504626]
[ 0.02275211]
[ 0.56987026]]

Hi @DrR,

Without your code is hard to spot where the problem is, one common occurence is putting the epsilon inside the square root, but looks like that’s not the case since you are getting the Ws right.

Maybe you should look carefully at your code since the formulas for the Ws and bs are equivalent, and prone to copy-paste mistakes.

If after reviewing your code the problem persists, feel free to send me your code via direct message (to not violate honor code here) and I’ll review it.

1 Like

Thank you Kampamocha.

I got it to work . The final error was due to the fact that I was referring to the class notes for the b-param implementation which is missing the db^2 ( discussed in the clarification note ).

Glad you found the solution.

Good luck with the rest of the course :slightly_smiling_face:.