tfmot.quantization.keras.graph_transformations.model_transformer.ModelTransformer
Stay organized with collections
Save and categorize content based on your preferences.
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
)
Args |
model
|
Keras model to be transformed.
|
transforms
|
List of transforms to be applied to the model.
|
candidate_layers
|
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.
|
layer_metadata
|
Dictionary of metadata associated with each layer in the
model. The keys are layer names.
|
Methods
View source
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)
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-05-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-05-26 UTC."],[],[]]