Week1 Assignment 3, What is the error in my code UNQ_C3

It is running, but why I did not get the expected output?

They do mention that the results are not that predictable. If it’s any comfort, I get different results than either what they show or what you got. Maybe the first question is just to submit to the grader and see what it says. It’s possible that your code is correct and we’re just seeing the unpredictability that they mentioned. Unlike a lot of the previous assignments, they don’t seem to set the random seeds here to make the results more predictable, although there are some unresolved questions about whether there is still randomness in the TF/Keras “compile and fit” process even when you set the seeds. Here’s a thread which discusses that w.r.t. one of the Course 4 ConvNet assignments.