|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 )
||Keras model to be transformed.|
||List of transforms to be applied to the model.|
||Names of layers which may be transformed. Only layers whose names are in candidate_layers are matched against patterns. The default is that all layers may be transformed.|
||Dictionary of metadata associated with each layer in the model. The keys are layer names.|
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.
|(Keras model after transformation, Updated layer metadata map)|