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

C4W3: My model trained well and loads normally:
vae.save(“anime.keras”)

however when I insert it in the submission, it gives me the error:
“Your model could not be loaded. Make sure it is a valid keras file, if this is the case please let us know.”

Does anyone know the reason?

Whats the extension of the file format that you are required to upload?

Hi Nathan and welcome to the Forum! May I ask the name of the class that computes the KLD loss? Is it KLDLoss or KLDLayer? If it’s KLDLoss, you might have used a slightly older version of the notebook. You can rename it to KLDLayer then re-run the entire notebook to have a new file with the expected classes. Sorry for the trouble but this should work. Hope it helps!

Hi @Natdo
Hope @chris.favila has solved your doubt. If you face any problem update us.

I too am facing the same problem.

I have also updated the name as stated above but I am still getting the same issue.

I have attached my notebook for reference

{mentor edit: code removed}

Please do not share your code on the forum. That’s not allowed by the Code of Conduct.

This thread has been cold for 11 months. I recommend you start a new one. You should explain the issue, and include screen captures of any error messages.

Do not include your code.