C3W1, birds.keras failed asignment

I am unable to pass the assignment because the autograder fails to deserialize my model file (birds.keras). Even though the model trains and saves correctly in my local/Colab environment, the grader returns a ValueError during the loading process. The error shown in the autograder has been attached.

Hi! Can you send me your latest notebook via direct message? You van click my name then the blue Message button. Thanks!

such error is usually when a learner has run down codes on different version of module for tf and keras than originally the lab codes were written in an older version.

check your lab code version for tf and keras

Update: We’re looking into this and we might need to update the graders or pin package versions in this course. Will publish updates by this coming Monday if needed. Thank you.

Hi. There is a compatibility issue with the Keras version that Colab recently updated to. It results in this error message when the grader tries to load your model:

Your model could not be loaded. Make sure it is a valid .keras file

The affected assignments are:

  • C3W1
  • C3W3
  • C4W2
  • C4W3

These notebooks have now been updated to rollback the Keras version. You can reopen them from the classroom. If you don’t want to rewrite your solution, you can simply add this to your old notebook (in the pip install cell before the imports):

!pip install keras==3.9.0

We’ll check if there are also effects on the other assignments this coming week.

Hope this helps!

2 Likes