I am having trouble with Exercise 8 for the Week 2 programming assignment. I put this code:
w, b = np.zeros((X_train.shape[0],1)),0
params, grads, costs = optimize(w, b, X_train, Y_train)
w = params[“w”]
b = params[“b”]
Y_prediction_test = predict(w,b,X_test)
Y_prediction_train = predict(w,b,X_train)
But it doesn’t work. I have been stuck on this for a while. Could someone point me in the right direction?
I read it. Thank you for sending it my way! I am still confused about initializing w and b. Is there a difference between using dims or using the zeros function?
Hi @ssr0910, you should share the error code in order for us to help you. You say it doesn’t work, what exactly isn’t working?
Looking at your code I see an obvious issue. Why aren’t you using the initialize_with_zeros function defined in Exercise 4?
That function should be working because it has been already tested in Exercise 4. I would suggest you to use it and if you’re still having issues to post the error log you’re getting.