DLS COURSE 4 WEEK2 Transfer learning

Can someone please help me find the mistake in my code. I tried to follow the links provided in the discussion, but still getting errors. I think there is some issue with “preprocess_input”, but could figure it. Thanks!

[removed code by moderator]

Heyo! So for a hint at this, once you apply data augmentation to the inputs, won’t you want to preprocess those same augmented inputs?

And can you please delete your code once you’ve fixed it? It’s not allowed to post the code according to the coursera honor code.

Thank you for your suggestion, the code is now running without any error.
While it passes all the tests when I submit it receives 66/100 for my grade!?

Here is the grader output:

Code Cell UNQ_C3: You have an incorrect value for ‘optimizer’ variable. We expected a value of ‘(<class ‘tensorflow.python.keras.optimizer_v2.adam.Adam’>, 0.0001)’ and you have ‘(<class ‘tensorflow.python.keras.optimizer_v2.adam.Adam’>, <tf.Variable ‘learning_rate:0’ shape=() dtype=float32, numpy=0.001>)’.

Can you please advise

First try restarting the kernel, and run all of the cells in the notebook again. Then look very carefully at the output for each cell, looking for any error messages.

If you don’t find any errors:

  • Passing all the tests does not prove your code is perfect. There are lots of possible errors that the tests do not catch.