Unexpected keyword argument "ragged" when training my own model

Hello, when I train my own image classification model using the same code in MobileNet, but changing some things like the class size, I get the error when I try to convert it to the .mlmodel format:
TypeError: init() got an unexpected keyword argument ‘ragged’

I am able to convert the provided model with no problems. The traceback points specifically to
best_model = load_model(“checkpoints/model-1.8717-0.8232.hdf5”)

Any ideas what might cause this?

It is probably some issue with different versions of the various packages that are incompatible with each other. This is why in the book we recommend using specific versions, which avoids such errors.

What version of Keras and TensorFlow are you using?