View source on GitHub |
Matches patterns to apply transforms in a tf.keras model graph.
tfmot.quantization.keras.graph_transformations.model_transformer.ModelTransformer(
model, transforms, candidate_layers=None, layer_metadata=None
)
Methods
transform
transform()
Transforms the Keras model by applying all the specified transforms.
This is the main entry point function used to apply the transformations to the Keras model.
Not suitable for multi-threaded use. Creates and manipulates internal state.
Returns | |
---|---|
(Keras model after transformation, Updated layer metadata map) |