tfmot.sparsity.keras.PruningSummaries
Stay organized with collections
Save and categorize content based on your preferences.
A Keras callback for adding pruning summaries to tensorboard.
tfmot.sparsity.keras.PruningSummaries(
log_dir, update_freq='epoch', **kwargs
)
Used in the notebooks
Logs the sparsity(%) and threshold at a given iteration step.
Methods
set_model
set_model(
model
)
Sets Keras model and writes graph if specified.
set_params
set_params(
params
)
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.
[null,null,["Last updated 2023-05-26 UTC."],[],[],null,["# tfmot.sparsity.keras.PruningSummaries\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/model-optimization/blob/v0.7.5/tensorflow_model_optimization/python/core/sparsity/keras/pruning_callbacks.py#L79-L138) |\n\nA Keras callback for adding pruning summaries to tensorboard. \n\n tfmot.sparsity.keras.PruningSummaries(\n log_dir, update_freq='epoch', **kwargs\n )\n\n### Used in the notebooks\n\n| Used in the guide |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| - [Pruning comprehensive guide](https://www.tensorflow.org/model_optimization/guide/pruning/comprehensive_guide) - [Pruning for on-device inference w/ XNNPACK](https://www.tensorflow.org/model_optimization/guide/pruning/pruning_for_on_device_inference) - [Pruning in Keras example](https://www.tensorflow.org/model_optimization/guide/pruning/pruning_with_keras) |\n\nLogs the sparsity(%) and threshold at a given iteration step.\n\nMethods\n-------\n\n### `set_model`\n\n set_model(\n model\n )\n\nSets Keras model and writes graph if specified.\n\n### `set_params`\n\n set_params(\n params\n )"]]