Load Quantized Keras Model

model_compression_toolkit.keras_load_quantized_model(filepath, custom_objects=None, compile=True, options=None)

This function wraps the keras load model and adds trainable quantizers classes to its custom objects.

Parameters:
  • filepath – the model file path.

  • custom_objects – Additional custom objects

  • compile – Boolean, whether to compile the model after loading.

  • options – Optional tf.saved_model.LoadOptions object that specifies options for loading from SavedModel.

Returns: A keras Model