Getting error in Logistic_Regression_with_a_NN_mindset

in week 2 assignment named “Logistic_Regression_with_a_Neural_Network_mindset”
after adding these two simple line:
w = np.zeros((dim,1))
b = 0
and running the cells, I got this error:

AssertionError Traceback (most recent call last)
in
2 w, b = initialize_with_zeros(dim)
3
----> 4 assert type(b) == float
5 print ("w = " + str(w))
6 print ("b = " + str(b))

AssertionError:

Hi @Mojtaba_Hassanzadeh

The variable b should be set as a float datatype. This can be done by setting b=0.0

1 Like

Great point!
thank u dear Kic