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.”
In fact when i load my model after i save it and then use it for prediction i get the output without error.
I have also changed the name from KLDLoss to KLDLayer, but still getting the same error
I have trained on my personal 4050 laptop gpu for reference.
did you check the downloaded model which you saved to submit has any ram memory. I had encountered issue like this and noticed the model i downloaded had 0 memory, Also check (i M not sure as I did long back this course) at the end there are some instructions given to be followed, check if you following.
Hi. This is a Tensorflow version issue. We’ve added this new cell at the top for compatibility with the autograder:
# IMPORTANT: Install grader-compatible versions of these packages.
# You can safely ignore dependency conflicts in the output.
!pip install tensorflow==2.18
!pip install tf-keras==2.18
!pip install ml-dtypes==0.5.1
You can also see it when you reopen the lab from the classroom. Please run that before running the rest of your code. That should let the grader successfully load your model. Also, if possible, I recommend training on Colab instead of your own machine. Hope this helps!