I saw previous answers to change dim = 2 to 2.0, but I’m unable to change it, why can’t I make any changes in that cell? also, why am I getting an assertion error in propagate function?
You don’t need to change the dim to 2.0. These cells are locked. You just need to write your code in cells starting with # GRADED FUNCTION and don’t need to write or change any other cells.
Regarding the error in propagate function, may be you are making mistakes. Make sure you are implementing all the codes correctly. Hint is given:
The problem is in initialize_with_zeros(), where b is initialized. Here, b should be assigned with the datatype float, you can do it like this:
b = 0.0
Your cost is incorrect. You missed the dot product between y & log(a) and (1-y) & log(1-a). See the below figure. First, you have to use sum; then inside that, you have to use dot; and then inside that, you have to use log function. Furthermore, you don’t need to use “*” , dot function will handle this.