Hi, I am not able to run this test successfully.
I am getting accuracy 0.9166666666666666
This is in the second question (def model_test)
Below is the error message:
in model_test(target)
21
22 assert W.shape == (2, 2), “W must be of shape 2 x 2”
—> 23 assert np.allclose(pred.transpose(), Y), “Model must give a perfect accuracy”
24 assert np.allclose(b[0], -1 * b[1]), “b should be symmetric in this example”
25
AssertionError: Model must give a perfect accuracy
Looking at the traceback posted here. The reason for the assertion being triggered with the error message ‘Model must give a perfect accuracy’ is due to the two arrays, pred and Y, are not elementwise equal within a tolerance level.
The problem is most likely to be within model(). A couple of suggestions to check your code enclosed by the ‘START CODE HERE’ and ‘END CODE HERE’:
forward propagation of avg
calculation of cost
making sure the correct parameters are passed to the calling functions.
I’m still having trouble with this section and have been working on it for several weeks. I have the same issue where my prediction doesn’t match Y. My accuracy drops to 0.75 on the 100th epoch. Would it be possible to take this offline to get some help?
Hello. I have the same problem:
Epoch: 0 — cost = 13.020271195168233
Accuracy: 0.8333333333333334
Epoch: 100 — cost = 2.3632182794792467
Accuracy: 0.75
but I don’t know how to solve it