DLS Course 1 W2 Practice Programming Assignment: Python Basics with Numpy

Hi all,
In Exercise 2 and 8, I took erros and only 1 test past and all other exercise test pass. I add error screenshoots.
Moreover my submissong gradded as 0.
How can I fix it?

Hi @Sena_Cakmak , welcome to the discourse community, I hope you are enjoying the course. The final grader uses different tests than the individual exercise graders, so that is the reason why the final grader gives back the above feedback.

To fix it, you have to make sure that the individual exercises (2 and 8) first work completely. So have a look at you basic sigmoid and loss functions of these exercises and double check the values and parameters you are using there.

It looks like you implemented sigmoid as e^x. Please compare that to the formula for sigmoid that they show in the text. When they said to “use math.exp”, they did not mean that was the complete answer. The first clue that something is wrong is that the output values (the “range”) of sigmoid is between 0 and 1, right?

Also note that your L1 value is negative. How can that be given that the formula for L1 is the sum of the absolute values of the differences? Absolute values are positive by definition, right? And if you add up positive numbers, it will still be positive.