Course2 Week1 Assignment Can't reach the requested accuracy

I can not pass the assignment as my accuracy is not high enough. I am building the requested NN fully complying with the structure that we are ask to build. I am also training the model using 10 epochs as requested. I have also trained the model several times to make sure that randomness of initialisation of the weights is not the issue - however I can not pass the assignment as the best accuracy I can reach is 83%. 90% at least is needed to pass. I have also been playing with the adam optimizer, trying different learning rates to no avail. I do not know what else I can do. Any help would be welcome.

Hi Sylvain! Kindly check your inbox. We might need a copy of your notebook to help us troubleshoot. Thanks!

Hi Sylvain! The issue is in the first exercise. You are expected to cast the images to float and scale them to [0,1]. However, the method you used already does the conversion so you don’t need to do it again. The docs say:

Images that are represented using floating point values are expected to have values in the range [0,1). Image data stored in integer data types are expected to have values in the range [0,MAX], where MAX is the largest positive representable number for the data type.

This op converts between data types, scaling the values appropriately before casting.

With that, you just need to remove the extra normalization in the 2nd line. Also, take note that you don’t need to resize the image. You only need to normalize. Otherwise, the grader will report an error about incorrect image dimensions.

An alternative to your solution is to do it with 2 lines of code. First, you will cast to float (see the last cells of this ungraded lab for a hint), then normalize the result. This is not required though and you can do it with the one-liner in your current solution.

Another important thing to note: It seems you added an extra model.summary() in your notebook. Please remove that because the grader will flag it.

Hope these help!

1 Like

Amazing thanks Chris! The notebook I shared with you was not the latest version (the session timed out so i could not save the latest version of my work & share it with you). The model.summary() cell was removed + I did not resize the images in my latest work. However the issue is defo with the extra normalization. Thanks again so much for your help here!

Awesome! Glad it worked!