I passed all the testcase (graded functions) up to the model function in which the code is running successfully with printing train accuracy and test accuracy but the test case was not passed.
I think because the grader is trying to compare the weights vector which i initialized with zeros to the weights vector after updating the weights which are not same.
the error is as follows:
AssertionError: Wrong values for d[‘w’]. [[0.]
[0.]
[0.]
[0.]] != [[ 0.08639757]
[-0.08231268]
[-0.11798927]
[ 0.12866053]]
do i need to change the grader instead of d[‘w’] to params[‘w’]…?
I can use some help, please if anyone …
Your weights are not updating, all are zeros. So, where the thing goes wrong? Are you calling the optimize
function?
I recommend you complete the entire notebook and pass all of its tests before you submit your notebook for grading.
Yes, as Saif points out, the problem is that the weight values you are returning after the training are still zero. So how could that happen? One thing to check is that you use consistent variable names for the dictionary containing the parameter values.
yeah
now its working fine