W2_A2_Error_Initialize with zeros undefined

Hi guys! I hope u doing well, I tries to replicate the results of week 2 assignment, building a binary classification problem that classify if an image is cat or not, but the results was not the same even I do the same as the assignment I don’t know why, I hope someone send him the notebook and the datasets and try to figure why, I tried but i didn’t figure it out, and thank you .
I don’t know if I’m allow to puplish the notebook here that’s why I tell you to send it in mail.

There is a fundamental problem with classifying “cat or not cat”.

There are an infinite number of things which are not a cat. How do you represent all of these possible not-cats in the training set?

Yes, the dataset is critical to getting good results. So it might help to know more about how you constructed your dataset. Did you just use the python code from the notebook “as is” with the new data? Or did you rewrite the basic architecture in a different way, e.g. by trying to reconstruct the ideas using TensorFlow or some other framework?

Please tell us a bit more and maybe that will shed some light, before we go to the level of looking at your implementation.

Actually note that we will learn more as you continue through DLS Course 1. In Week 4, we get to build a real 4 layer neural network to solve the same “cat recognition” problem. It will do better than the Logistic Regression method in Week 2, but still won’t give us a very general solution.

So the other approach here would be to “hold that thought” and continue through to the end of Course 1 and then try to duplicate the results using the Week 4 full NN implementation. That might be more general in terms of what you’d learn.

I used the same dataset, 1 if it is cat otherwise 0, knwing that i download whole files in lab

Yeah, I used the same code in python file, also I implement the model using vectorization like in the assignment, with some small changes that I’m sure is not the cause off problem.

If you literally used the same dataset and the same code, then the results should be the same. So there must be something that is not actually the same. Of course there are a lot of “support” routines in addition to the code in the notebook. Are you sure you downloaded and used the same routines for loading the data and the other “utility” functions?

The other possibility is that you’re getting newer versions of numpy, although I wouldn’t think that would cause any issues, but it’s possible …

I fixed the problem by using the exact code in lab, and the results are the same. Now, I need to locate the issue within my own code. Thanks!

{moderator edit - solution code removed}

Hey mosh greetings can u help me with this assignment as it does not allow me to call the function I already created.I have been trying for hours but could not do it. Please help!!!

Hi @Hridam_Adhikari ,

The execution environment is not picking up the definition for initialize_with_zeros() function. You need to rerun the code from start.