Pruning
Defined in tensorflow/contrib/model_pruning/python/pruning.py.
__init____init__(
spec=None,
global_step=None,
sparsity=None
)
Set up the specification for model pruning.
If a spec is provided, the sparsity is set up based on the sparsity_function in the spec. The effect of sparsity_function is overridden if the sparsity variable is passed to the constructor. This enables setting up arbitrary sparsity profiles externally and passing it to this pruning functions.
spec: Pruning spec as defined in pruning.protoglobal_step: A tensorflow variable that is used while setting up the sparsity functionsparsity: A tensorflow scalar variable storing the sparsityadd_pruning_summariesadd_pruning_summaries()
Adds summaries for this pruning spec.
Args: none
Returns: none
conditional_mask_update_opconditional_mask_update_op()
mask_update_opmask_update_op()
print_hparamsprint_hparams()
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/model_pruning/Pruning