Failed Tests for create_final_model in Course 2 Week 3

Hi everyone,

I hope you’re all enjoying the TF1 Course 2 Week 3 content on Transfer Learning in the Horses vs. Humans assignment. I wanted to discuss a particular issue I encountered during the assignment related to the create_final_model and the failed tests for it.

In the assignment, we are required to use a custom callback to stop training the model when it reaches 99.9% accuracy on the validation set. To achieve this, we have the following code snippet:

While the intention of the callback is clear, it seems that some of us are facing issues with failed tests related to create_final_model. The problem might arise from multiple sources, such as incorrect implementation of the callback, the model architecture, or even the dataset preprocessing.

If you have successfully completed this assignment and the tests are passing as expected, could you please share your insights or any tips that helped you overcome the issue with create_final_model? It would be greatly appreciated by those of us who are currently facing challenges.

Please do the following:

  1. The trailing part of the stacktrace is important. So, change the screenshot / create a code cell with the proper stacktrace. Here’s the community user guide to get started.
  2. Sharing the complete notebook is discouraged and it can get your account suspended. So, update your text to remove asking for solutions.
  3. If this topic is related to this reply, don’t create duplicates.
  4. The concept of callback was covered in course 1 week 2 of this specialization. Please go through the lectures / assignments if things are unclear.

To better understand the process, I’ve executed the code and captured a screenshot of the relevant output. Here’s the screenshot with the proper stacktrace: