How to convert .hdf5 to .h5 keras model

Viewed 2221

I have a pre-trained hdf5 model background removal model that I've used from here. I'm looking to convert it to h5 as coremltools converter requires that type.

So far, the coremltools python script gives the following error:

NotImplementedError: Expected model format: [SavedModel | [concrete_function] | tf.keras.Model | .h5], got main_model.hdf5
1 Answers

It's literally the same format, so you can change the extension by renaming the file to .h5 and it should work fine.

Related