Model could not be loaded

Hello,
I have trained the ‘Bird Box’ model successfully and the model summary checks out. However, when I download the ‘birds.h5’ file and upload it for grading, I received the message: “Your model could not be loaded. Make sure it is a valid h5 file.”

What might I be doing wrong here?

As was posted in the discussion forum on Coursera, this is an issue with the grader not being updated to TensorFlow 2.6. Please update the grading system!

Hi David! Thank you for flagging this! Will report this to the team for fixing.

Hello, has this been fixed? I tried to upload as well and got the same error.

@venmarco, the permanent change to the grader hasn’t been made yet, but there is a work-around in the assignment, which is intended to make it compatible with TF2.5:

# Average pooling 2D layer. 
# Used instead of GlobalAveragePooling2D for compatibility with the current 
# version of the grader. Please do not modify. (Date: 08/19/2021)
x = tf.keras.layers.AveragePooling2D((7,7))(features)

As long as you didn’t change this, it sounds like you probably have a different issue

Hi, I am having the same problem right now. 1 year later.

I also have the same issue

@Eyal_Tuzon,
This assignment was updated to TensorFlow 2.6 back in October, 2021, so the problem you’re seeing must be something different.

Let’s use the other post you opened, Your model could not be loaded. Make sure it is a valid h5 file to track this new issue