I have difficulties reaching the desired 0.95 accuracy for C3W4 assignment. I have searched the previous posts and have checked my code for loss function, optimizer, etc. But still could not figure out why. Here is my loss function:
You did not define function that could taken on label, you only did for image.
Please define label using tf.one_hot function in the def augment image. grader cell.
The below statement is an optional steps but if you are not getting the desired accuracy, I would suggest you to explore this option but not mandatory.
optional: superimpose the saliency map with the original image, then display it.
we encourage you to do this to visualize your results better.
For you model compile statement you loss choice is incorrect, it is not a multicategorial classification but only categorical classification with 2 class, so using sparse is incorrect.
Let me know if you are still stuck, sorry for the delay in response, not keeping well.
Also @Yan_Du kindly make sure once you do these correction, then follow the steps of fallback runtime and then run all the cells one by one, then submit your model for successful submission.