C2W4. Error in submit. "Your model could not be loaded."

I do task in colab

everything is ok, I download ZIP, Submit it.

But have error
“Your model could not be loaded. Make sure the zip file has the correct contents.”
I don’t change anything in saving and zip model

The same model in Coursera was sabmited successfully

Who knows what colab interface might be adding to that zipfile…

But in the task there is a big description how to use Colab, because of GPU. This is one of two options.
And no one tested it before created such task?

Hi,

I don’t know if it can be related, but colab doesn’t accept TensorFlow 2.6 anymore. In the top of you notebook. Try to update the pip install command at the top of your notebook and instal TensorFlow and Keras 2.8 instead of 2.6 and redo and resubmit the model.

Hope it helps.

I’ve encountered the same issue with the submission of mymodel.zip file. Has anyone figured out a solution yet? I tried to create the zip file in colab as well as locally on my device but it didn’t help. Still the same error saying “Your model could not be loaded. Make sure the zip file has the correct contents.”
… any suggestions?

Hi Katerina, with version of Colab and Keras are you using?

I think that it may work with 2.9.0.

Hope it helps!

@Katerina, thanks for pointing this out!
This problem showed up a few months ago in a couple other assignments, caused by the autograder expecting an older version of tensorflow than Coursera and Colab are now using.
It looks like this assignment has the same problem, but got overlooked when the other assignments were fixed. I’ll report this to staff so they can update this assignment, too.
In the meantime, you can work around the problem by inserting a code cell at the beginning of the assignment with these lines:

# Install packages for compatibility with the autograder
!pip install tensorflow==2.8.0
!pip install keras==2.8.0
1 Like

The assignment has been updated now, so this should not be an issue for future learners. The fix includes a cell at the beginning that you will need to run if you are using colab in order to pip install the needed tensorflow and keras versions.

Thanks again, @Katerina, for pointing this out!