tf.contrib.model_pruning.Pruning

Methods

__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.

Args:

• spec: Pruning spec as defined in pruning.proto
• global_step: A tensorflow variable that is used while setting up the sparsity function
• sparsity: A tensorflow scalar variable storing the sparsity

add_pruning_summaries

add_pruning_summaries()


Adds summaries for this pruning spec.

Args: none

Returns: none

conditional_mask_update_op

conditional_mask_update_op()


mask_update_op

mask_update_op()

print_hparams()